MLOpsIntermediate4h

MLflow.

Tracking experiments, parameters, and model versions.

What is MLflow?

MLflow records your ML experiments — the parameters you tried, the metrics you got, and the model artifacts produced — so each run is logged and comparable. It also versions models in a registry. It turns scattered, forgettable experiments into an organized, reproducible history.

Why it matters

ML is endless experimentation, and without tracking you quickly lose which settings produced your best model. "Which run was that?" becomes unanswerable. Experiment tracking makes your work reproducible and comparable, which is both good science and a basic expectation on any ML team.

What to learn

  • Logging parameters, metrics, and artifacts per run
  • Comparing runs to find the best model
  • The model registry and versioning
  • Reproducing a run from its logged config
  • Organizing experiments
  • Integrating tracking into a training script
  • Alternatives like Weights & Biases

Common pitfall

Tracking experiments in your memory or a text file, then being unable to reproduce the good result a week later because you do not know the exact parameters, data, and code that produced it. Log every run automatically from the start — the run you forget to track is always the one you later need.

Resources

Primary (free):

Practice

Add MLflow tracking to a training script: log the hyperparameters, the evaluation metrics, and the trained model artifact for each run. Run it a few times with different settings and compare the runs to pick the best. Done when you can reproduce your best run from its logged configuration.

Outcomes

  • Log parameters, metrics, and artifacts for each run.
  • Compare runs to identify the best model.
  • Version models in a registry.
  • Reproduce a past run from its logged configuration.
Back to AI / ML roadmap