Skip to content

Add support to log customized tags to runs created by autolog #9114

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

Merged
merged 14 commits into from
Jul 28, 2023

Conversation

thinkall
Copy link
Contributor

Related Issues/PRs

Resolve #9064

What changes are proposed in this pull request?

Added a parameter extra_tags to all autolog functions, and passed it to safe_patch function in mlflow.utils.autologging_utils.safety.py.

With this extra_tags, users can log customized tags to runs created by autolog.

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.

Users can set the parameter extra_tags in mlflow.autolog(extra_tags={"test_tag": "autolog"}) and all the other specific autolog functions such as mlflow.sklearn.autolog(extra_tags={"test_tag": "sklearn_autolog"}) to log the extra_tags into runs created by autolog.

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/gateway: AI Gateway service, Gateway client APIs, third-party Gateway integrations
  • 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

@harupy harupy added the only-latest If applied, only test the latest version of each group in cross-version tests. label Jul 19, 2023
Signed-off-by: Li Jiang <[email protected]>
@mlflow-automation
Copy link
Collaborator

mlflow-automation commented Jul 19, 2023

Documentation preview for 6ed7c2e will be available here when this CircleCI job completes successfully.

More info

@github-actions github-actions bot added area/tracking Tracking service, tracking client APIs, autologging rn/feature Mention under Features in Changelogs. labels Jul 19, 2023
@thinkall
Copy link
Contributor Author

Hi @serena-ruan , could you help review the PR? Thanks.

Copy link
Collaborator

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

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

@thinkall Overall looks great! Left a few comments :)

I think it could be more clear that we split tags test.

@thinkall
Copy link
Contributor Author

@thinkall Overall looks great! Left a few comments :)

I think it could be more clear that we split tags test.

Thank you Serana, I've split all the tests for extra_tags. Warning messages and built-in tags checking have been included as well.

Signed-off-by: Li Jiang <[email protected]>
@thinkall thinkall requested a review from serena-ruan July 20, 2023 12:40
Signed-off-by: Li Jiang <[email protected]>
@serena-ruan
Copy link
Collaborator

LGTM! @harupy You wanna take a look? 😃

@thinkall
Copy link
Contributor Author

Thank you @serena-ruan, and hi, @harupy ! Just a gentle reminder to take a look :-)

Copy link
Collaborator

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

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

LGTM

@serena-ruan serena-ruan merged commit 0751e8c into mlflow:master Jul 28, 2023
@thinkall thinkall deleted the add_custom_tags_autolog branch July 28, 2023 10:09
BenWilson2 pushed a commit to BenWilson2/mlflow that referenced this pull request Jul 31, 2023
santiagxf pushed a commit to santiagxf/mlflow that referenced this pull request Aug 7, 2023
clarkh-ncino pushed a commit to ncino/mlflow that referenced this pull request Aug 23, 2023
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 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.

[FR] Support logging customized tags to runs created by autolog
4 participants