2

I'm trying to create a new experiment on mlflow but I have this problem:

Exception: Run with UUID l142ae5a7cf04a40902ae9ed7326093c is already active.

This is my code:

import mlflow
import mlflow.sklearn
import sys

mlflow.set_experiment("New experiment 2")

mlflow.set_tracking_uri('http://mlflow:5000')
st= mlflow.start_run(run_name='Test2')
id = st.info.run_id
mlflow.log_metric("score", score)
mlflow.sklearn.log_model(model, "wineModel")
dhood
  • 23
  • 3

1 Answers1

1

Run mlflow.end_run() to repair the active run. Then you can create new ones.


Note: the problematic run should have Lifecycle Stage: active (rather than deleted) displayed in MLflow web UI, so if you deleted it when trying to solve the problem, it needs to be first restored / undeleted (it can be found in the "trash" using MLFlow web UI thus: Filter > State > Deleted).

mirekphd
  • 4,799
  • 3
  • 38
  • 59
dgrana
  • 108
  • 6