LoslegenKostenlos loslegen

MLFlow for logging and retrieving data

MLflow is an open-source platform for managing the ML lifecycle. It can be used to keep track of experiments, packaging code into reproducible runs, and sharing and deploying models. In the following exercise, you will log some of the parameters of a training experiment for your heart disease model. mlflow is imported, and the trained heart disease model has been loaded for you.

Diese Übung ist Teil des Kurses

End-to-End Machine Learning

Kurs anzeigen

Anleitung zur Übung

  • Initialize an MLflow experiment named "Logistic Regression Heart Disease Prediction".
  • Start a run, and log the trained models coefficient and intercept.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Initialize the MLflow experiment
____.____("Logistic Regression Heart Disease Prediction")

# Start a run, log model coefficients and intercept
with ____.____:
    for idx, coef in enumerate(model.coef_[0]):
        ____.____(f"coef_{idx}", ____)
    ____.____("intercept", model.intercept_[0])
	
    run_id = mlflow.active_run().info.run_id
    print(run_id)
Code bearbeiten und ausführen