Skip to content

Use SQLite as default unless existing mlruns data is detected#18497

Merged
harupy merged 17 commits intomlflow:masterfrom
harupy:test-default-sqlite
Nov 18, 2025
Merged

Use SQLite as default unless existing mlruns data is detected#18497
harupy merged 17 commits intomlflow:masterfrom
harupy:test-default-sqlite

Conversation

@harupy
Copy link
Member

@harupy harupy commented Oct 24, 2025

Related Issues/PRs

#18534

What changes are proposed in this pull request?

This PR changes the default tracking URI from file-based storage (./mlruns) to SQLite database (sqlite:///mlflow.db).

Backward Compatibility: Existing mlruns directories with experiment data are automatically detected and continue using file store, ensuring seamless migration for existing users.

How is this PR tested?

  • Existing unit/integration tests
  • New tests for backward compatibility detection

Does this PR require documentation update?

  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Release Notes

Is this a user-facing change?

  • Yes. Give a description of this change to be included in the release notes for MLflow users.

Breaking Change: The default tracking URI has been changed from file-based storage (./mlruns) to SQLite database (sqlite:///mlflow.db). Users who rely on the default behavior will now use SQLite instead of file-based storage. To revert to the previous behavior, set MLFLOW_TRACKING_URI=./mlruns or use mlflow.set_tracking_uri("./mlruns").

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/build: Build and test infrastructure for MLflow

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

Should this PR be included in the next patch release?

Yes should be selected for bug fixes, documentation updates, and other small changes. No should be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.

What is a minor/patch release?

  • Minor release: a release that increments the second part of the version number (e.g., 1.2.0 -> 1.3.0).
    Bug fixes, doc updates and new features usually go into minor releases.

  • Patch release: a release that increments the third part of the version number (e.g., 1.2.0 -> 1.2.1).
    Bug fixes and doc updates usually go into patch releases.

  • Yes (this PR will be cherry-picked and included in the next patch release)

  • No (this PR will be included in the next minor release)

@github-actions github-actions bot added the rn/none List under Small Changes in Changelogs. label Oct 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2025

Documentation preview for 34e5bc4 is available at:

More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

@harupy harupy force-pushed the test-default-sqlite branch from 4a7be95 to 98020fb Compare November 14, 2025 09:03
@harupy harupy changed the title Change defualt tracking_uri to sqlite Change default tracking_uri to sqlite Nov 14, 2025
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy force-pushed the test-default-sqlite branch from e29e143 to 2e12c65 Compare November 17, 2025 05:39
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy changed the title Change default tracking_uri to sqlite Change default tracking URI to sqlite Nov 17, 2025
@harupy harupy changed the title Change default tracking URI to sqlite Change default tracking URI to SQLite and improve TypeScript tests Nov 17, 2025
@github-actions github-actions bot added area/build Build and test infrastructure for MLflow area/tracing MLflow Tracing and its integrations area/tracking Tracking service, tracking client APIs, autologging rn/breaking-change Mention under Breaking Changes in Changelogs. and removed rn/none List under Small Changes in Changelogs. labels Nov 17, 2025
@harupy harupy changed the title Change default tracking URI to SQLite and improve TypeScript tests Change default tracking URI to SQLite Nov 17, 2025
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy added the team-review Trigger a team review request label Nov 17, 2025
@github-actions github-actions bot removed the area/tracing MLflow Tracing and its integrations label Nov 17, 2025
Comment on lines +222 to +223
"See https://github.com/mlflow/mlflow/issues/18534 for feedback and how to migrate "
"existing data.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ideally we should add both. Can we add a notable warning box in https://mlflow.org/docs/latest/self-hosting/ about the defauilt change and link to Github issue for details? Can we do that in a follow-up? I think we need some doc clean up anyway (e.g., remove explicit '--backend-store-uri sqlite:///mlflow.db' specification in some examples)

@harupy
Copy link
Member Author

harupy commented Nov 18, 2025

/resolve


🚀 Resolve workflow started


✅ Workflow completed successfully.

Claude Output

Summary

I successfully resolved the unresolved PR review comments for PR #18497. Here's what was addressed:

Changes Made:

  1. mlflow/store/tracking/file_store.py:220 - Changed deprecation warning wording from "is deprecated" to "will be deprecated" to use a softer, less assertive tone as suggested by the reviewer.

  2. mlflow/tracking/_tracking_service/utils.py:30 - Enhanced the docstring for _has_existing_mlruns_data() to explain the backward compatibility context: the function checks for existing mlruns data so the default tracking URI can remain as file-based storage for existing workflows.

Skipped:

  • One review thread had an explicit instruction from the reviewer (harupy) saying "Claude: ignore this review comment" - this was correctly skipped as it was marked for follow-up work.

Commit:

All changes have been committed locally with DCO sign-off (commit: 50739c5). Pre-commit hooks ran successfully and passed all checks. The changes are ready but have NOT been pushed to the remote repository as per instructions.

- Change deprecation warning from "is deprecated" to "will be deprecated" for softer tone
- Add context to _has_existing_mlruns_data() docstring explaining backward compatibility purpose

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
@harupy harupy requested a review from B-Step62 November 18, 2025 08:10
- Change deprecation warning from "is deprecated" to "will be deprecated"
- Update terminology from "model registry backend" to "tracking backend"
- Update tests to match the new warning message format
- Improve warning text clarity by restructuring the migration guidance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy requested a review from serena-ruan November 18, 2025 09:16
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
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!

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Copy link
Collaborator

@B-Step62 B-Step62 left a comment

Choose a reason for hiding this comment

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

LGTM!

@harupy harupy enabled auto-merge November 18, 2025 10:32
@harupy harupy added this pull request to the merge queue Nov 18, 2025
Merged via the queue into mlflow:master with commit aae3db2 Nov 18, 2025
47 checks passed
@harupy harupy deleted the test-default-sqlite branch November 18, 2025 10:48
harupy added a commit to harupy/mlflow that referenced this pull request Nov 18, 2025
Updates self-hosting documentation to reflect that SQLite is now the
default tracking backend (changed in MLflow 3.7 via mlflow#18497).

Changes:
- Add warning box in self-hosting overview about default change
- Update quickstart examples to remove explicit SQLite flags
- Update tracking server documentation with new defaults
- Add guidance for existing users (auto-detection) and new users

Addresses: mlflow#18497 (comment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
harupy added a commit to harupy/mlflow that referenced this pull request Nov 18, 2025
Updates self-hosting documentation to reflect that SQLite is now the
default tracking backend (changed in MLflow 3.7 via mlflow#18497).

Changes:
- Add warning box in self-hosting overview about default change
- Update quickstart examples to remove explicit SQLite flags
- Update tracking server documentation with new defaults
- Add guidance for existing users (auto-detection) and new users

Addresses: mlflow#18497 (comment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
harupy added a commit to harupy/mlflow that referenced this pull request Nov 18, 2025
Updates self-hosting documentation to reflect that SQLite is now the
default tracking backend (changed in MLflow 3.7 via mlflow#18497).

Changes:
- Add warning box in self-hosting overview about default change
- Update quickstart examples to remove explicit SQLite flags
- Update tracking server documentation with new defaults
- Add guidance for existing users (auto-detection) and new users

Addresses: mlflow#18497 (comment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
harupy added a commit to harupy/mlflow that referenced this pull request Nov 18, 2025
Updates self-hosting documentation to reflect that SQLite is now the
default tracking backend (changed in MLflow 3.7 via mlflow#18497).

Changes:
- Add warning box in self-hosting overview about default change
- Update quickstart examples to remove explicit SQLite flags
- Update tracking server documentation with new defaults
- Add guidance for existing users (auto-detection) and new users

Addresses: mlflow#18497 (comment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
harupy added a commit to harupy/mlflow that referenced this pull request Nov 18, 2025
Updates self-hosting documentation to reflect that SQLite is now the
default tracking backend (changed in MLflow 3.7 via mlflow#18497).

Changes:
- Add warning box in self-hosting overview about default change
- Update quickstart examples to remove explicit SQLite flags
- Update tracking server documentation with new defaults
- Add guidance for existing users (auto-detection) and new users

Addresses: mlflow#18497 (comment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
harupy added a commit to harupy/mlflow that referenced this pull request Nov 18, 2025
Updates self-hosting documentation to reflect that SQLite is now the
default tracking backend (changed in MLflow 3.7 via mlflow#18497).

Changes:
- Add warning box in self-hosting overview about default change
- Update quickstart examples to remove explicit SQLite flags
- Update tracking server documentation with new defaults
- Add guidance for existing users (auto-detection) and new users

Addresses: mlflow#18497 (comment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
jimilp7 pushed a commit to backspace-org/mlflow that referenced this pull request Nov 21, 2025
…#18497)

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
mprahl pushed a commit to opendatahub-io/mlflow that referenced this pull request Nov 21, 2025
…#18497)

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
Tian-Sky-Lan pushed a commit to Tian-Sky-Lan/mlflow that referenced this pull request Nov 24, 2025
…#18497)

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
Signed-off-by: Tian Lan <sky.blue266000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build and test infrastructure for MLflow area/tracking Tracking service, tracking client APIs, autologging rn/breaking-change Mention under Breaking Changes in Changelogs. team-review Trigger a team review request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants