Skip to content
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

Merged
merged 9 commits into from
Dec 21, 2020

Conversation

dbczumar
Copy link
Collaborator

@dbczumar dbczumar commented Dec 19, 2020

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?

  • 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.

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/projects: MLproject format, project running backends
  • area/scoring: Local serving, model deployment tools, spark UDFs
  • area/server-infra: MLflow server, JavaScript dev server
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, JavaScript, plotting
  • 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: Corey Zumar <corey.zumar@databricks.com>
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
Comment on lines 887 to 909
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
Copy link
Collaborator Author

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>
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
@github-actions github-actions bot added area/tracking Tracking service, tracking client APIs, autologging rn/none List under Small Changes in Changelogs. labels Dec 21, 2020
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
Signed-off-by: Corey Zumar <corey.zumar@databricks.com>
Copy link
Member

@harupy harupy left a comment

Choose a reason for hiding this comment

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

lgtm!

@dbczumar dbczumar merged commit 43dcbef into mlflow:master Dec 21, 2020
lorenzwalthert pushed a commit to lorenzwalthert/mlflow that referenced this pull request Dec 23, 2020
…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>
lorenzwalthert pushed a commit to lorenzwalthert/mlflow that referenced this pull request Jan 15, 2021
…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>
harupy pushed a commit to chauhang/mlflow that referenced this pull request Apr 8, 2021
…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>
harupy pushed a commit to wamartin-aml/mlflow that referenced this pull request Jun 7, 2021
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracking Tracking service, tracking client APIs, autologging rn/none List under Small Changes in Changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants