mlflow/mlflow

MLflow + Ultralytics: Experiment logs are forcibly saved to /Shared/Ultralytics despite custom EXPERIMENT_NAME in mlflow.set_experiment(EXPERIMENT_NAME)

Open

#24,130 opened on 2026年6月23日

GitHub で見る
 (6 comments) (0 reactions) (0 assignees)Python (3,904 forks)batch import
good first issue

Repository metrics

Stars
 (17,127 stars)
PR merge metrics
 (平均マージ 2d 9h) (30d で 246 merged PRs)

説明

[!WARNING] Before submitting a PR, please make sure that:

  • A maintainer has triaged this issue and applied the ready label
  • This issue has no assignee
  • No duplicate PR exists

PRs not meeting these requirements may be automatically closed.

Summary

I was fine-tuning a YOLO26x-sem model and decided to track my experiment in the "Experiment 2" folder. I ran the code below in a Jupyter Notebook cell:

%%time
settings.update({"mlflow": True})
DB_PATH = "my_experiment.db"
TRACKING_URI = f"sqlite:///my_experiment.db"

os.environ["MLFLOW_TRACKING_URI"] = TRACKING_URI
EXPERIMENT_NAME = "Experiment 2"

mlflow.set_tracking_uri(TRACKING_URI)
mlflow.set_experiment(EXPERIMENT_NAME)

print(f"✅ Tracking URI: {mlflow.get_tracking_uri()}")
print(f"✅ Database: {DB_PATH}")
print(f"✅ Experiment: {EXPERIMENT_NAME}")

exp = mlflow.get_experiment_by_name(EXPERIMENT_NAME)
print(f"✅ Experiment ID: {exp.experiment_id}")

and I received the following output:

2026/06/22 21:18:29 INFO mlflow.store.db.utils: Creating initial MLflow database tables...
2026/06/22 21:18:30 INFO mlflow.store.db.utils: Updating database tables
2026/06/22 21:18:31 INFO mlflow.tracking.fluent: Experiment with name 'Experiment 2' does not exist. Creating a new experiment.
✅ Tracking URI: sqlite:///my_experiment.db
✅ Database: my_experiment.db
✅ Experiment: Experiment 2
✅ Experiment ID: 1
CPU times: total: 1.14 s
Wall time: 1.65 s

In the terminal, I started the MLflow server with:

mlflow ui --backend-store-uri sqlite:///my_experiment.db --host 0.0.0.0 --port 5000` command.

When I finished, I suddenly realized that all models were stored in the Shared/Ultralytics folder.

and my Experiment 2 folder was empty:

I tried placing settings.update({"mlflow": True}) in different parts of the code cell at the beginning, but the result was still the same. I also read the MLflow documentation: https://docs.ultralytics.com/integrations/mlflow#introduction

Could you please explain why I received this result and how to correctly control the folder hierarchy in MLflow experiments in the future?

Notes

I used Jupyter Notebook with YOLO CLI. My MLFlow version is 3.14

コントリビューターガイド