Create mlflow experiment: Run with UUID is already active

Viewed 675

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")
1 Answers

You have to run mlflow.end_run() to finish the first experiment. Then you can create another

Related