Skip to content

Comments

Fixing MLFlow Tracking Directory#693

Merged
aritraghsh09 merged 1 commit intomainfrom
mlflow-fixes
Feb 11, 2026
Merged

Fixing MLFlow Tracking Directory#693
aritraghsh09 merged 1 commit intomainfrom
mlflow-fixes

Conversation

@aritraghsh09
Copy link
Collaborator

In the last two weeks at some point, we had erroneously changed where the MLFlow results were being stored.

We want the MLFlow results to be stored,not inside individual results directories, but at the root. This was the behaviour before. Not sure when it got changed.

@aritraghsh09 aritraghsh09 self-assigned this Feb 11, 2026
@aritraghsh09 aritraghsh09 added the bug Something isn't working label Feb 11, 2026
@aritraghsh09 aritraghsh09 marked this pull request as ready for review February 11, 2026 23:50
Copilot AI review requested due to automatic review settings February 11, 2026 23:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Hyrax’s MLflow file-store location so experiment/run artifacts are tracked under the configured results root directory (the historical behavior) rather than inside each per-run results subdirectory.

Changes:

  • Update MLflow tracking URI in the train verb to use <config.general.results_dir>/mlflow instead of <results_dir>/mlflow.


mlflow.set_tracking_uri("file://" + str(results_dir / "mlflow"))
results_root_dir = Path(config["general"]["results_dir"]).expanduser().resolve()
mlflow.set_tracking_uri("file://" + str(results_root_dir / "mlflow"))
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Building the MLflow tracking URI via string concatenation ("file://" + str(...)) can produce invalid URIs on some platforms (notably Windows paths). Prefer constructing the URI with Path(...).as_uri() (or equivalent) so the file:// URL is correctly formed across OSes.

Suggested change
mlflow.set_tracking_uri("file://" + str(results_root_dir / "mlflow"))
mlflow_tracking_dir = (results_root_dir / "mlflow").resolve()
mlflow.set_tracking_uri(mlflow_tracking_dir.as_uri())

Copilot uses AI. Check for mistakes.
Comment on lines +93 to +94
results_root_dir = Path(config["general"]["results_dir"]).expanduser().resolve()
mlflow.set_tracking_uri("file://" + str(results_root_dir / "mlflow"))
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

This change is a regression fix in where MLflow stores its backend (root results_dir vs per-run results_dir). There are existing end-to-end/unit tests for training (tests/hyrax/test_train.py), but none assert the MLflow tracking directory behavior; consider adding a test that mocks mlflow.set_tracking_uri and verifies it is called with <config.general.results_dir>/mlflow (not <results_dir>/mlflow).

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Copy link
Contributor

Copilot AI commented Feb 11, 2026

@aritraghsh09 I've opened a new pull request, #694, to work on those changes. Once the pull request is ready, I'll request review from you.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.26%. Comparing base (68c8e0c) to head (2ff808b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #693      +/-   ##
==========================================
+ Coverage   63.25%   63.26%   +0.01%     
==========================================
  Files          59       59              
  Lines        5769     5771       +2     
==========================================
+ Hits         3649     3651       +2     
  Misses       2120     2120              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@drewoldag drewoldag left a comment

Choose a reason for hiding this comment

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

This seems fine, especially if this unblocks you.

@aritraghsh09 aritraghsh09 merged commit 19fb5f9 into main Feb 11, 2026
15 checks passed
@aritraghsh09 aritraghsh09 deleted the mlflow-fixes branch February 11, 2026 23:56
@github-actions
Copy link

Before [68c8e0c] After [80ca930] Ratio Benchmark (Parameter)
1.93±0.1s 2.05±0.05s 1.06 benchmarks.time_download_help
1.94±0.08s 2.03±0.01s 1.05 benchmarks.time_help
1.88±0.08s 1.97±0.04s 1.05 benchmarks.time_train_help
1.89±0.07s 1.97±0.04s 1.04 benchmarks.time_database_connection_help
1.91±0.08s 1.98±0.02s 1.04 benchmarks.time_infer_help
203±5ms 209±3ms 1.03 benchmarks.time_import
1.93±0.07s 1.97±0.03s 1.02 benchmarks.time_lookup_help
1.94±0.06s 1.97±0.03s 1.02 benchmarks.time_prepare_help
1.93±0.08s 1.97±0.04s 1.02 benchmarks.time_rebuild_manifest_help
1.90±0.09s 1.94±0.02s 1.02 benchmarks.time_umap_help

Click here to view all benchmarks.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants