Skip to content

Commit c71a1c9

Browse files
committed
Using experiment_name from config to set mlflow experiment name.
1 parent 86ff5fb commit c71a1c9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/fibad/train.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ def run(config):
5454

5555
results_root_dir = Path(config["general"]["results_dir"]).resolve()
5656
mlflow.set_tracking_uri("file://" + str(results_root_dir / "mlflow"))
57-
mlflow.set_experiment("notebook")
57+
58+
# Get experiment_name and cast to string (it's a tomlkit.string by default)
59+
experiment_name = str(config["train"]["experiment_name"])
60+
61+
# This will create the experiment if it doesn't exist
62+
mlflow.set_experiment(experiment_name)
5863

5964
with mlflow.start_run(log_system_metrics=True):
6065
_log_params(config)

0 commit comments

Comments
 (0)