Skip to content

[Support inference params-2]Add params for PyFunc predict#8973

Merged
serena-ruan merged 7 commits into
mlflow:masterfrom
serena-ruan:pyfunc
Jul 7, 2023
Merged

[Support inference params-2]Add params for PyFunc predict#8973
serena-ruan merged 7 commits into
mlflow:masterfrom
serena-ruan:pyfunc

Conversation

@serena-ruan

Copy link
Copy Markdown
Collaborator

Related Issues/PRs

Depends on: #8972

What changes are proposed in this pull request?

Support params field for PyFunc models and PythonModel.

How is this patch tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests (describe details, including test results, below)

Does this PR change the documentation?

  • No. You can skip the rest of this section.
  • Yes. Make sure the changed pages / sections render correctly in the documentation preview.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.
    Support passing additional parameters as params dictionary to model predict method

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/recipes: Recipes, Recipe APIs, Recipe configs, Recipe Templates
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

Language

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

How should the PR be classified in the release notes? Choose one:

  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Signed-off-by: Serena Ruan <[email protected]>
@mlflow-automation

mlflow-automation commented Jul 6, 2023

Copy link
Copy Markdown
Contributor

Documentation preview for 0096fee will be available here when this CircleCI job completes successfully.

More info

@github-actions github-actions Bot added area/models MLmodel format, model serialization/deserialization, flavors rn/feature Mention under Features in Changelogs. labels Jul 6, 2023
@serena-ruan serena-ruan added the only-latest If applied, only test the latest version of each group in cross-version tests. label Jul 6, 2023
@serena-ruan
serena-ruan marked this pull request as draft July 7, 2023 00:15
@serena-ruan
serena-ruan marked this pull request as ready for review July 7, 2023 10:34
@serena-ruan
serena-ruan requested review from BenWilson2 and harupy July 7, 2023 10:34
Comment thread mlflow/pyfunc/__init__.py
@serena-ruan

serena-ruan commented Jul 7, 2023

Copy link
Copy Markdown
Collaborator Author

Seems like converting a draft PR to a normal PR doesn't trigger the workflows automatically.
And after I close and reopen the PR, it still cancels those workflows 🤔

cc @harupy

@serena-ruan serena-ruan closed this Jul 7, 2023
@serena-ruan serena-ruan reopened this Jul 7, 2023
Comment thread mlflow/pyfunc/__init__.py Outdated
Comment thread mlflow/pyfunc/__init__.py Outdated
Signed-off-by: Serena Ruan <[email protected]>
Signed-off-by: Serena Ruan <[email protected]>
@serena-ruan
serena-ruan requested a review from BenWilson2 July 7, 2023 14:51

@BenWilson2 BenWilson2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @serena-ruan :)

@serena-ruan
serena-ruan enabled auto-merge (squash) July 7, 2023 15:07
@serena-ruan
serena-ruan merged commit 9ebab71 into mlflow:master Jul 7, 2023
@serena-ruan
serena-ruan deleted the pyfunc branch July 8, 2023 04:53
serena-ruan added a commit to serena-ruan/mlflow that referenced this pull request Jul 13, 2023
serena-ruan added a commit that referenced this pull request Jul 13, 2023
* add predict params for pyfunc and python model

Signed-off-by: Serena Ruan <[email protected]>

* fix

Signed-off-by: Serena Ruan <[email protected]>

* add more tests and fix a small bug

Signed-off-by: Serena Ruan <[email protected]>

* address comments

Signed-off-by: Serena Ruan <[email protected]>

* add warnings for params missing case

Signed-off-by: Serena Ruan <[email protected]>

* reformat

Signed-off-by: Serena Ruan <[email protected]>

---------

Signed-off-by: Serena Ruan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/models MLmodel format, model serialization/deserialization, flavors only-latest If applied, only test the latest version of each group in cross-version tests. rn/feature Mention under Features in Changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants