-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add info-level logs when new fluent runs are during autologging #3874
Conversation
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
mlflow/tensorflow.py
Outdated
auto_end = False | ||
if not mlflow.active_run(): | ||
global _AUTOLOG_RUN_ID | ||
if _AUTOLOG_RUN_ID: | ||
try_mlflow_log(mlflow.start_run, _AUTOLOG_RUN_ID) | ||
else: | ||
try_mlflow_log(mlflow.start_run) | ||
try_mlflow_log(mlflow.set_tag, MLFLOW_AUTOLOGGING, FLAVOR_NAME) | ||
auto_end = True | ||
|
||
serialized = original(self, *args, **kwargs) | ||
try_mlflow_log( | ||
log_model, | ||
tf_saved_model_dir=serialized.decode("utf-8"), | ||
tf_meta_graph_tags=[tag_constants.SERVING], | ||
tf_signature_def_key="predict", | ||
artifact_path="model", | ||
) | ||
if ( | ||
mlflow.active_run() is not None and mlflow.active_run().info.run_id == _AUTOLOG_RUN_ID | ||
) or auto_end: | ||
try_mlflow_log(mlflow.end_run) | ||
return serialized |
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.
This is an exact duplicate of the export_savedmodel
body. We can apply the exact same patch code for export_saved_model
and export_savedmodel
using safe_patch
without requiring duplicate code.
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
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.
lgtm!
…ow#3874) * Add info log Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Format Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Fix Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Print for user managed Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Black Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Rephrase slightly Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Patch Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
…ow#3874) * Add info log Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Format Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Fix Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Print for user managed Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Black Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Rephrase slightly Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Patch Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
…ow#3874) * Add info log Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Format Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Fix Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Print for user managed Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Black Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Rephrase slightly Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Patch Signed-off-by: Corey Zumar <corey.zumar@databricks.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
…ow#3874) * Add info log Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Format Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Fix Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Print for user managed Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Black Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Rephrase slightly Signed-off-by: Corey Zumar <corey.zumar@databricks.com> * Patch Signed-off-by: Corey Zumar <corey.zumar@databricks.com> Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
What changes are proposed in this pull request?
Adds some additional info logging to indicate when MLflow runs are created as a result of autologging workflows.
How is this patch tested?
Existing unit / integration tests for continued correctness
Release Notes
Added new info logs for MLflow run creation during autologging workflows.
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