Skip to content
BENIBIX Learn

MLflow

Also known as ML Flow, MLflow Tracking

A free tool that logs each training run and stores the models it makes.

Think of it like

It is like a lab notebook that fills itself in. Each test you run gets its own page.

Example

Emma adds two lines of MLflow to her training script. After 30 runs she opens its web page and sorts them by score to find the best settings.

Why it matters

Without a log, nobody can say which settings made the best model. MLflow keeps that record for free.

Definition

MLflow is a free, open source tool for keeping track of machine learning work. It logs each training run with its settings, scores and saved model. It also has a model registry, so a team can mark which version is ready to use. Newer parts trace and test apps built on language models. It is run as a Linux Foundation project, and Databricks first built it.

Example code

python
import mlflow

with mlflow.start_run():
    mlflow.log_param("learning_rate", 0.01)
    mlflow.log_metric("accuracy", 0.91)
One run, one setting and one score saved. MLflow keeps them so runs can be compared later.
MLflow sits on the track runs box. It also covers the registry step next to it.

Common mistake

Logging scores but not the data version. Then the best run cannot be rebuilt later.

Key takeaways

  1. 1
    Logs every run. Settings, scores and the saved model.
  2. 2
    Registry built in. Marks which version is ready to use.
  3. 3
    Free and open. Apache 2.0, run on your own servers or in a cloud.