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




