-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Only import matplotlib where necessary for artifact plotting #3703
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
dbczumar
commented
Nov 16, 2020
@@ -500,6 +499,7 @@ def _log_specialized_estimator_content(fitted_estimator, run_id, fit_args, fit_k | |||
display.ax_.set_title(artifact.title) | |||
filepath = tmp_dir.path("{}.png".format(artifact.name)) | |||
display.figure_.savefig(filepath) | |||
import matplotlib.pyplot as plt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sklearn's plotting functionality depends on matplotlib; accordingly, we do not anticipate that this import will fail
23 tasks
thanks for the very quick fix! |
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
harupy
approved these changes
Nov 16, 2020
LGTM! |
harupy
added a commit
to harupy/mlflow
that referenced
this pull request
Nov 19, 2020
…3703) * Only import matplotlib where necessary for artifact plotting Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Silly change for formatter Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
harupy
added a commit
to harupy/mlflow
that referenced
this pull request
Nov 19, 2020
…3703) * Only import matplotlib where necessary for artifact plotting Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Silly change for formatter Signed-off-by: Corey Zumar <corey.zumar@databricks.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
harupy
added a commit
that referenced
this pull request
Nov 19, 2020
* Do not disable existing logger when init alembic (#3653) Signed-off-by: ruoxuany <ruoxuan.yin@citrix.com> Co-authored-by: ruoxuany <ruoxuan.yin@citrix.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Only import matplotlib where necessary for artifact plotting (#3703) * Only import matplotlib where necessary for artifact plotting Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Silly change for formatter Signed-off-by: Corey Zumar <corey.zumar@databricks.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Fix run_link for cross-workspace model versions (#3681) Fix run_link for cross-workspace model versions Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> Co-authored-by: ruoxuany <ruoxuan.yin@citrix.com>
harupy
added a commit
to mlflow-automation/mlflow
that referenced
this pull request
Dec 24, 2020
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
harupy
added a commit
to harupy/mlflow
that referenced
this pull request
Dec 24, 2020
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
harupy
added a commit
that referenced
this pull request
Dec 24, 2020
* updates Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * update UI updates / fixes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Add #3867 in small-changes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move #3815 in autologging enhancements Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move #3859 in small changes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Classify #3768 as a small bug fix Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move up #3552 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move #3703 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move #3643 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * replace #3815 with #3682 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Address comments Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Address comment Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * update Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * fix order Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> Co-authored-by: harupy <17039389+harupy@users.noreply.github.com> Co-authored-by: Harutaka Kawamura <hkawamura0130@gmail.com> Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com>
lorenzwalthert
pushed a commit
to lorenzwalthert/mlflow
that referenced
this pull request
Jan 15, 2021
* updates Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * update UI updates / fixes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Add mlflow#3867 in small-changes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3815 in autologging enhancements Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3859 in small changes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Classify mlflow#3768 as a small bug fix Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move up mlflow#3552 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3703 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3643 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * replace mlflow#3815 with mlflow#3682 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Address comments Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Address comment Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * update Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * fix order Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> Co-authored-by: harupy <17039389+harupy@users.noreply.github.com> Co-authored-by: Harutaka Kawamura <hkawamura0130@gmail.com> Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com>
harupy
added a commit
to chauhang/mlflow
that referenced
this pull request
Apr 8, 2021
* updates Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * update UI updates / fixes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Add mlflow#3867 in small-changes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3815 in autologging enhancements Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3859 in small changes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Classify mlflow#3768 as a small bug fix Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move up mlflow#3552 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3703 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3643 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * replace mlflow#3815 with mlflow#3682 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Address comments Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Address comment Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * update Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * fix order Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> Co-authored-by: harupy <17039389+harupy@users.noreply.github.com> Co-authored-by: Harutaka Kawamura <hkawamura0130@gmail.com> Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
harupy
added a commit
to wamartin-aml/mlflow
that referenced
this pull request
Jun 7, 2021
* updates Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * update UI updates / fixes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Add mlflow#3867 in small-changes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Update CHANGELOG.rst Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3815 in autologging enhancements Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3859 in small changes Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Classify mlflow#3768 as a small bug fix Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move up mlflow#3552 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3703 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * move mlflow#3643 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * replace mlflow#3815 with mlflow#3682 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Address comments Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Address comment Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * update Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * fix order Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> Co-authored-by: harupy <17039389+harupy@users.noreply.github.com> Co-authored-by: Harutaka Kawamura <hkawamura0130@gmail.com> Co-authored-by: dbczumar <39497902+dbczumar@users.noreply.github.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
area/tracking
Tracking service, tracking client APIs, autologging
rn/bug-fix
Mention under Bug Fixes in Changelogs.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Corey Zumar corey.zumar@databricks.com
What changes are proposed in this pull request?
Moves a top-level matplotlib import for
mlflow.sklearn.autolog()
into the exception-caught artifact logging block where its required. This ensures that matplotlib is not a hard dependency formlflow.sklearn.autolog()
.How is this patch tested?
Existing unit tests ensure that artifact logging continues to function properly with the presence of matplotlib. @eedeleon and I will discuss strategies for testing the degraded functionality when matplotlib is unavailable, which is important in the context of a skinny client
Release Notes
Bug fix:
mlflow.sklearn.autolog()
no longer has a hard dependency on matplotlib.Is this a user-facing change?
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/projects
: MLproject format, project running backendsarea/scoring
: Local serving, model deployment tools, spark UDFsarea/server-infra
: MLflow server, JavaScript dev serverarea/tracking
: Tracking Service, tracking client APIs, autologgingInterface
area/uiux
: Front-end, user experience, JavaScript, plottingarea/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