"Which run produced our best model?" is the most expensive question in ML. If you can't answer it in 30 seconds — code commit, data version, hyperparameters, environment — you've already lost weeks of work. Weights & Biases, MLflow, and DVC exist so that answer is one click away.
Learning Objectives
After this lesson, you will be able to:
Track every experiment's hyperparameters, metrics, code version, data version, and artifacts in a system of record (W&B, MLflow, Comet, Neptune)
Use a model registry to manage model versions, lifecycle stages, and approvals for production deployment
Apply DVC or LakeFS to version datasets alongside code so any experiment is fully reproducible months later
Recognize when 'it worked on my notebook' becomes 'I can't reproduce my best model from 6 months ago' — and the patterns that prevent it
Python version, package versions (pip freeze), CUDA version
Reproducibility
The core principle: anything you might need to debug a model in 6 months must be logged at training time. Storage is cheap; lost knowledge is expensive.
The market has consolidated around five names. Each makes different tradeoffs; picking the wrong one is annoying but rarely catastrophic — most can export to a common format if you decide to migrate.
Tool
Hosted / OSS
Strengths
Weaknesses
W&B (Weights & Biases)
Hosted SaaS + self-host
Best UI; collaboration features (reports, sweeps, tables); huge ecosystem
Most expensive at scale; vendor lock-in
MLflow
OSS, you host
Free; widely integrated (Databricks built-in); model registry mature
UI dated; multi-team collaboration weaker
Comet
Hosted SaaS
Strong on artifacts and reproducibility reports; experiment diffing
Smaller community than W&B
Neptune
Hosted SaaS
Lightweight; very fast logging; clean Python API
Fewer integrations; less collaboration tooling
ClearML
OSS + hosted
Adds orchestration + agents (think W&B + light Airflow); good for self-hosted teams
Steeper learning curve
A pragmatic 2026 decision matrix:
Solo / small team, budget-flexible: W&B Personal (free tier). Best UI, no infra.
Larger team, budget pressure or compliance: MLflow self-hosted on K8s + S3. Free; works.
Research lab on Databricks already: Databricks Managed MLflow. Already paid for.
Need real-time experiment logging from millions of metrics: Neptune. Built for that volume.
Want orchestration + tracking unified: ClearML or Metaflow.
Experiment trackers double as hyperparameter sweep engines: they generate hyperparameter samples (grid, random, Bayesian, or population-based), launch the runs, and aggregate the results into a leaderboard. This is the same algorithmic surface as the hyperparameter-tuning lesson in track 03, but plugged directly into the tracking system.
The integration with tracking is the value-add over a plain optuna script: every sweep run is automatically logged, tagged, and visible in the same UI you use for one-off runs. You can filter the leaderboard by sweep_id, plot parameter-importance charts, and re-launch the top-K runs with longer schedules. MLflow has similar machinery via mlflow.projects + Hyperopt; Comet wraps Optuna.
The cross-reference matters: track 03 covers the algorithms (grid vs random vs Bayesian vs PBT). This lesson covers the infrastructure that lets you run them at scale and not lose the results. Pair them.
What Do You Think?
A research team runs a 200-trial Bayesian sweep using their tracking tool. The leaderboard shows three runs in a tight cluster at the top, with val_loss 0.342, 0.343, 0.344. Statistical noise or real differences?
A tracker's leaderboard becomes the team's shared truth — but only if everyone agrees on what's logged. Three patterns that scale across teams:
Required tags policy. Enforced by a thin wrapper around mlflow.start_run() / wandb.init() that refuses to start a run without project, owner, dataset_version, and git_sha set. A 10-line decorator saves quarters of "what was this run?" archaeology.
Standardized eval suites. A common holdout set (or set of holdouts) every run is evaluated against, logged under canonical metric names. Without this, two runs claiming val_acc=0.92 may be measuring different things and you can't trust the leaderboard.
Reports as the artifact. W&B Reports and MLflow's Markdown UI let you compose narrative artifacts (charts, tables, prose) that link directly to runs. The "report" replaces the death-by-PowerPoint review meeting — reviewers click into individual runs from the prose.
A model registry tracks model versions with lifecycle states:
None → Staging → Production → Archived
↘ Failed
Stage
Meaning
None
Just trained, no decision made
Staging
Candidate for production, in evaluation
Production
Currently serving real traffic
Archived
Retired, kept for audit/lineage
Approval gates between stages are critical. "Promote to production" should require: passing eval gates, sign-off from ML lead, monitoring dashboards live.
Model lineage=(Data hash,Code hash,Hyperparams,Metrics)→Model artifact hash
Tracking code is easy (git). Tracking 100GB datasets is hard (git can't handle it). DVC (Data Version Control) treats data like code:
bash
# Track a dataset
dvc add data/train.parquet
git add data/train.parquet.dvc
git commit -m "Track v1 dataset"
# Later, retrieve any version
git checkout abc123 # specific commit
dvc pull # pulls the matching dataset
DVC stores the data in S3/GCS/Azure (or any backend) and tracks metadata in Git. LakeFS is the modern alternative — Git-like operations on entire data lakes.
Tests · Verify the run shows up in MLflow UI with all params, metrics, and the saved model. Verify you can load the model back via mlflow.pytorch.load_model(model_uri='runs:/<run_id>/model').
#A Minimal Logging Stub (W&B and MLflow side-by-side)
The actual API surface for logging is small. Below is a runnable stub that simulates both W&B-style and MLflow-style logging — same data, two protocols. Use it to practice the shape; then drop it into a real script.
Loading visualization...
Practice swapping between the two shapes is the cheapest way to understand the data model that sits behind both. Once you see that "config / params / hyperparameters" all mean the same thing, that "tags / set_tag / metadata" are the same thing, and that "log / log_metric / log_metrics" are step-indexed scalar time series, you can switch platforms without re-learning anything.
Quick check
A team logs `train_loss` and `val_loss` every step but no `epoch` field. After 200 runs, they want to plot mean val_loss at the end of epoch 5 across all runs. What's wrong?
Why is data versioning (DVC) needed in addition to code versioning (Git)?
What Do You Think?
Your team self-hosts MLflow. After 18 months they have 12,000 runs. The UI is slow; queries take 30+ seconds; some runs are missing artifacts. Most likely root cause?
Track every experiment so any can be reproduced. Next: containerization, the environment dimension of reproducibility.