liveBook · Manning

Experiment tracking

As explained in Machine Learning Platform Engineering

An experiment tracker is a software component that records machine-learning experiment configurations, results, and artifacts.

Experiment tracking records what went into a training run and what came out. Without it, comparing models may mean reconstructing notebook changes, searching commits, or trusting a spreadsheet. A shared tracker makes parameters, data, metrics, and artifacts available for comparison and later investigation—especially when several people run experiments over time. section 4.1 section 9.3.4

Use MLflow to move from an exploratory notebook to identifiable runs:

  • Start a local tracking UI with `mlflow ui`, then set its tracking URI and an experiment name in the notebook. section 4.1.2
  • Wrap each attempt in `mlflow.start_run()`. Its run ID identifies the parameters, metrics, and artifacts captured for that attempt. section 4.1.2
  • Log useful artifacts as well as scores: exploratory plots, datasets, and model files provide context for interpreting a result. section 4.1 section 4.1.2
  • Compare runs before selecting a model; keep its dependencies and version accessible through the model registry for collaboration or deployment. section 4.0
mlflow.set_tracking_uri("http://localhost:5000")
mlflow.set_experiment("income-classifier")

The two-line notebook setup points MLflow at the local server and groups subsequent runs under one named experiment. section 4.1.2

Changing a recommender’s learning rate

A recommender test uses 6,400 random samples, batches of 64, and 30 epochs. A second run changes the learning rate to `1e-2`. Recording both configurations matters: the reported precision, recall, and RMSE change, and a team needs the original settings to revisit either result. In a pipeline, training logs the model under a run ID; validation can load it with a `runs:/` URI and log metrics against that run. section 9.3.4

Tracking supports lineage rather than replacing the rest of the ML workflow. Keep code, configuration, data, and models distinguishable so a result can be traced and reproduced. For production work, MLflow provides multi-experiment tracking and artifact storage; TensorBoard offers closer inspection of an individual training run. A central view also helps developers and stakeholders discuss model performance. section 2.1.3 section 9.4

How Machine Learning Platform Engineering covers it

How deep it goes
Works through local MLflow setup, run and artifact logging, then run-linked training and validation; does not detail tracker internals.
Examples
Uses income-classification notebook plots and model runs, then recommender runs that compare learning-rate settings and validation metrics.
What it assumes
Starts from notebook-based data exploration and model training while providing commands to install MLflow and start a local tracker.
What you can do after
Apply it via MLflow to group and compare runs, preserve artifacts, and load a model by run ID for validation.
How it connects
Links experiment tracking to data and model versioning, model lineage, training pipelines, model registries, and validation metrics.

Also explained in

Compare how 5 books explain experiment tracking →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.