Skip to content

[Fix] Use SQLite for default MLflow tracking - #1698

Open
appleweiping wants to merge 1 commit into
open-mmlab:mainfrom
appleweiping:fix-mlflow-sqlite-backend-1687
Open

appleweiping wants to merge 1 commit into
open-mmlab:mainfrom
appleweiping:fix-mlflow-sqlite-backend-1687

Conversation

@appleweiping

Copy link
Copy Markdown

Motivation

MLflow 3.14 rejects filesystem tracking stores unless the compatibility escape hatch is enabled. This makes the default MLflowVisBackend initialization fail. Fixes #1687.

Modification

When tracking_uri is not supplied, MLflowVisBackend now stores metadata in a SQLite database at save_dir/mlflow.db and artifacts under save_dir/artifacts. Explicit tracking_uri and artifact_location values keep their existing behavior.

The regression test verifies that the default tracking URI is SQLite and that the database is created. It uses a non-persistent SQLAlchemy pool during tests so Windows can remove the temporary database.

BC-breaking

The default local metadata store changes from the legacy MLflow filesystem format to SQLite. Existing filesystem runs are not migrated automatically. They can be migrated with MLflow's migrate-filestore command. Explicit tracking URIs are unchanged.

Validation

  • Reproduced the failure with MLflow 3.14.0
  • MLflowVisBackend tests: 8 passed
  • Visualization backend test file: 37 passed and 14 skipped before unrelated DVCLive tests failed because optional dvclive and pygit2 packages were not installed
  • flake8, isort, YAPF, docformatter, and pyupgrade passed for the changed files

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@appleweiping

Copy link
Copy Markdown
Author

The CircleCI lint job fails during pre-commit initialization, before it checks the changed files. Its Python 3.7 environment resolves a pre-commit version that rejects the hook manifest stage named pre-commit. The changed files pass flake8, isort, and YAPF locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] MlflowVisBackend fails due to use of deprecated filesystem store

2 participants