Implemented unwrap_python_model() method in mlflow.pyfunc.PyFuncModel#6807
Implemented unwrap_python_model() method in mlflow.pyfunc.PyFuncModel#6807BenWilson2 merged 8 commits intomlflow:masterfrom ikrizanic:implement-fr-6794
unwrap_python_model() method in mlflow.pyfunc.PyFuncModel#6807Conversation
|
@ikrizanic Thanks for the contribution! The DCO check failed. Please sign off your commits by following the instructions here: https://github.com/mlflow/mlflow/runs/8372124536. See https://github.com/mlflow/mlflow/blob/master/CONTRIBUTING.md#sign-your-work for more details. |
| marginTop: '0', | ||
| width: '100%', | ||
| height: '100%', | ||
| padding: '5px', |
There was a problem hiding this comment.
This is unintentional, right?
There was a problem hiding this comment.
Yes it is, I wasnt aware of any other files in this commit.
There was a problem hiding this comment.
Could you revert this change?
There was a problem hiding this comment.
Maybe I should've reverted the whole commit and not just the change
BenWilson2
left a comment
There was a problem hiding this comment.
Can you add tests that validate that the object returned from this unwrapping generates the same predictions as a base model object and that object attributes match?
I added test in new file |
* Added padding to artifact text viewer Signed-off-by: Shraddha Falane <[email protected]> * Modified padding for artifact text viewer Signed-off-by: Shraddha Falane <[email protected]> Signed-off-by: Shraddha Falane <[email protected]> Signed-off-by: Ivan Križanić <[email protected]>
Signed-off-by: Ivan Križanić <[email protected]>
Signed-off-by: Ivan Križanić <[email protected]>
Signed-off-by: Ivan Križanić <[email protected]>
Signed-off-by: Ivan Križanić <[email protected]>
Co-authored-by: Ben Wilson <[email protected]> Signed-off-by: Ivan Križanić <[email protected]> Signed-off-by: Ivan Križanić <[email protected]>
Signed-off-by: Ivan Križanić <[email protected]>
Signed-off-by: Ivan Križanić <[email protected]>
BenWilson2
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the contribution!
|
Thank you for your help! |
…el (mlflow#6807) * Added padding to artifact text viewer (mlflow#6778) * Added padding to artifact text viewer Signed-off-by: Shraddha Falane <[email protected]> * Modified padding for artifact text viewer Signed-off-by: Shraddha Falane <[email protected]> Signed-off-by: Shraddha Falane <[email protected]> Signed-off-by: Ivan Križanić <[email protected]> * Implemented `unwrap_python_model()` method in mlflow.pyfunc.PyFuncModel Signed-off-by: Ivan Križanić <[email protected]> * Simplified unwrap_python_model and added test for it Signed-off-by: Ivan Križanić <[email protected]> * Fixed lint and test errors Signed-off-by: Ivan Križanić <[email protected]> * Remove unused imports Signed-off-by: Ivan Križanić <[email protected]> * Update mlflow/pyfunc/__init__.py Co-authored-by: Ben Wilson <[email protected]> Signed-off-by: Ivan Križanić <[email protected]> Signed-off-by: Ivan Križanić <[email protected]> * reverted change in ShowArtifactTextView.js Signed-off-by: Ivan Križanić <[email protected]> * Optimized imports and reformated with black Signed-off-by: Ivan Križanić <[email protected]> Signed-off-by: Shraddha Falane <[email protected]> Signed-off-by: Ivan Križanić <[email protected]> Signed-off-by: Ivan Križanić <[email protected]> Co-authored-by: Shraddha Falane <[email protected]> Co-authored-by: Ivan Križanić <[email protected]> Co-authored-by: Ben Wilson <[email protected]>
Signed-off-by: Ivan Križanić [email protected]
Related Issues/PRs
Close #6794
What changes are proposed in this pull request?
Implemented
unwrap_python_model()method inmlflow.pyfunc.PyFuncModelclass which enables direct access to wrapped python module when loading model withmlfow.pyfunc.load_modelHow is this patch tested?
There are no dedicated tests for this method, but it's tested by using it in an appropriate workflow.
Does this PR change the documentation?
Detailslink on thePreview docscheck.Release Notes
Is this a user-facing change?
Users are now able to load wrapped python model when using
mlflow.pyfunc.load_model()method and use custom implemented methods of that object.What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/artifacts: Artifact stores and artifact loggingarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesarea/examples: Example codearea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models: MLmodel format, model serialization/deserialization, flavorsarea/pipelines: Pipelines, Pipeline APIs, Pipeline configs, Pipeline Templatesarea/projects: MLproject format, project running backendsarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/server-infra: MLflow Tracking server backendarea/tracking: Tracking Service, tracking client APIs, autologgingInterface
area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows: Windows supportLanguage
language/r: R APIs and clientslanguage/java: Java APIs and clientslanguage/new: Proposals for new client languagesIntegrations
integrations/azure: Azure and Azure ML integrationsintegrations/sagemaker: SageMaker integrationsintegrations/databricks: Databricks integrationsHow should the PR be classified in the release notes? Choose one:
rn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notes