Conversation
There was a problem hiding this comment.
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
trainverb to use<config.general.results_dir>/mlflowinstead 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")) |
There was a problem hiding this comment.
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.
| 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()) |
| results_root_dir = Path(config["general"]["results_dir"]).expanduser().resolve() | ||
| mlflow.set_tracking_uri("file://" + str(results_root_dir / "mlflow")) |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
|
@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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
drewoldag
left a comment
There was a problem hiding this comment.
This seems fine, especially if this unblocks you.
Click here to view all benchmarks. |
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.