Repository navigation
fix(workflow): default MLFLOW_ALLOW_FILE_STORE to true for filesystem tracking (#2391) - #2399
Open
X6m (X6M-Work) wants to merge 1 commit into
Open
X6m (X6M-Work) wants to merge 1 commit into
X6m (X6M-Work) wants to merge 1 commit into
Conversation
Author
@microsoft-github-policy-service agree |
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.
Description
Fixes #2391
Qlib's default experiment manager (
MLflowExpManager) uses a local filesystem tracking URI (./mlruns/file:...). In environments where newer MLflow releases are installed or loaded outside CI (whereMLFLOW_ALLOW_FILE_STORE="true"is exported in the GitHub Actions workflow environment), callingR.start()/MLflowClient(tracking_uri=...)raises anMlflowExceptionunlessMLFLOW_ALLOW_FILE_STOREis enabled.Changes
MLFLOW_ALLOW_FILE_STOREto"true"viaos.environ.setdefault("MLFLOW_ALLOW_FILE_STORE", "true")inqlib/workflow/__init__.py,qlib/workflow/expm.py,qlib/workflow/exp.py, andqlib/workflow/recorder.py(both at module load and beforeMlflowClientconstruction) so Qlib's default localmlrunsfilesystem tracking store works out of the box while still respecting any explicit user override inos.environ.tests/test_ci_configuration.pyandtests/dependency_tests/test_mlflow.py.Motivation and Context
Resolves #2391 where
R.start()fails withMlflowExceptionon local filesystem tracking URIs whenMLFLOW_ALLOW_FILE_STOREhas not been manually exported in the user's shell environment.How Has This Been Tested?
python -m pytest tests/test_ci_configuration.py(17 passed)MLflowExpManager.clientsetsMLFLOW_ALLOW_FILE_STORE="true"when unset and preserves an existing environment value when already set.Types of changes