Machine Learning - Experiment Tracking

What to track

  • Params: hyperparameters, data versions, code commit hash.
  • Metrics: loss/accuracy, latency, drift metrics.
  • Artifacts: models, plots, confusion matrices.

MLflow quick start

# pip install mlflow
import mlflow
mlflow.set_experiment("demo")
with mlflow.start_run():
    mlflow.log_params({"lr": 1e-3, "epochs": 10})
    mlflow.log_metric("val_acc", 0.91)
    mlflow.log_artifact("model.joblib")