change logic for experiment env variables#6674
Merged
BenWilson2 merged 3 commits intobranch-2.0from Sep 2, 2022
Merged
Conversation
Signed-off-by: Ben Wilson <[email protected]>
Member
Author
|
Examples failing due to gpytorch issue |
dbczumar
reviewed
Sep 1, 2022
dbczumar
reviewed
Sep 1, 2022
Signed-off-by: Ben Wilson <[email protected]>
dbczumar
reviewed
Sep 1, 2022
mlflow/tracking/fluent.py
Outdated
Comment on lines
+1644
to
+1645
| message=f"The provided environment variable {_EXPERIMENT_ID_ENV_VAR} " | ||
| f"`{experiment_id}` does not match the experiment id " |
Collaborator
There was a problem hiding this comment.
Suggested change
| message=f"The provided environment variable {_EXPERIMENT_ID_ENV_VAR} " | |
| f"`{experiment_id}` does not match the experiment id " | |
| message=f"The provided {_EXPERIMENT_ID_ENV_VAR} environment variable " | |
| f"value `{experiment_id}` does not match the experiment id " |
dbczumar
reviewed
Sep 1, 2022
mlflow/tracking/fluent.py
Outdated
Comment on lines
+1660
to
+1662
| message=f"The provided environment variable {_EXPERIMENT_ID_ENV_VAR} " | ||
| f"`{experiment_id}` does not exist in the tracking server. Provide a valid " | ||
| f"experiment_id.", |
Collaborator
There was a problem hiding this comment.
Suggested change
| message=f"The provided environment variable {_EXPERIMENT_ID_ENV_VAR} " | |
| f"`{experiment_id}` does not exist in the tracking server. Provide a valid " | |
| f"experiment_id.", | |
| message=f"The provided {_EXPERIMENT_ID_ENV_VAR} environment variable " | |
| f"value `{experiment_id}` does not exist in the tracking server. Provide a valid " | |
| f"experiment_id.", |
dbczumar
approved these changes
Sep 1, 2022
Collaborator
dbczumar
left a comment
There was a problem hiding this comment.
LGTM! Thanks @BenWilson2 !
Signed-off-by: Ben Wilson <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related Issues/PRs
#xxx
What changes are proposed in this pull request?
Update the behavior of MLFLOW_EXPERIMENT_NAME and MLFLOW_EXPERIMENT_ID logic such that values provided in either of these variables are validated against the tracking server to ensure that the user's intent is preserved and no silent failures send runs to the default experiment id.
Prior behavior:
If
experiment_nameorexperiment_idin environment variables does not exist in the tracking server, use the defaultexperiment_id.New behavior:
If an experiment is active, use that experiment (ignore environment variables).
Otherwise:
If
experiment_nameis provided in environment variables, validate that experiment name exists in tracking server. If not, raise an Exception.If
experiment nameandexperiment_idare both provided, check that theexperiment_nameis registered in the tracking server AND that theexperiment_idfrom the tracking server matches the environment variableexperiment_id. If not, raise and Exception.If
experiment_idis provided, validate tracking server registration. If non-existent, provide a custom exception that explains that the environment variable is what is causing the issue (instead of the general tracking server exception aboutexperiment_idnot being found).How is this patch tested?
Modification to existing test suite for the fluent api.
Does this PR change the documentation?
Detailslink on thePreview docscheck.Release Notes
Is this a user-facing change?
(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)
Update the behavior of MLFLOW_EXPERIMENT_NAME and MLFLOW_EXPERIMENT_ID logic such that values provided in either of these variables are validated against the tracking server to ensure that the user's intent is preserved and no silent failures send runs to the default experiment id.
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