AI State of the Art
MLOps/MLOps Pipeline/18 min
Section 188

Experiment Tracking: MLflow, Weights & Biases, Neptune

Listen as a podcast →

The problem: how many configurations have you tested again?

A serious ML project easily means hundreds of experiments. Learning rate of 1e-3 or 3e-4? Architecture with 6 or 12 layers? Dataset v2 or v3? Batch size 32 or 128? Each combination is an experiment. And each experiment produces loss curves, evaluation metrics, model checkpoints.

Without a structured system, you get lost very quickly. "Which model had the best results? With which hyperparameters? On which data?", the honest answer is often "no idea, I overwrote the results last week."

Experiment tracking automatically records, for each training run:

  • Hyperparameters: learning rate, batch size, warmup steps, architecture, etc.
  • Metrics: loss, accuracy, perplexity, F1, and their evolution throughout training
  • Artifacts: model checkpoints, visualizations, confusion matrices, logs
  • Environment: library versions, code Git commit, hardware used
  • Data: dataset version, basic statistics (size, distribution)
The Excel spreadsheet trap

Many start with a Google Sheets spreadsheet to track experiments. With 10 runs, it's manageable. With 100, it's painful. With 1,000, it's unusable. Tracking tools offer parameter search, metric filtering, visual curve comparison, and automatic reproduction of a past experiment. It's a qualitative leap.

MLflow: the open-source standard

MLflow, created by Databricks, is the most widely adopted tracking tool in the world. Its main advantage: it's open source, flexible, and free of vendor lock-in.

MLflow's 4 components

  • Tracking: the core product. Record params, metrics, and artifacts for each experiment. Web interface for exploring, comparing, filtering.
  • Models: a standardized format for packaging a model with its dependencies. An MLflow model deploys on any compatible platform.
  • Model Registry: model lifecycle management. A model goes from "staging" to "production" to "archived," with a complete history of transitions.
  • Projects: reproducible ML code packaging (conda/docker environment + entry point).
Four cards side by side labeled Tracking, Projects, Models and Model Registry, each with a sentence describing its role in MLflow.
MLflow's four building blocks from above. Tracking records code, data and results; Projects packages the code so it can be re-run elsewhere; Models wraps the model for deployment; Model Registry stores and annotates it in a central repository.Source : Arize AI

Concrete strengths

  • Open source: deployable on your own infrastructure, zero license cost, your data stays with you
  • Agnostic: works with PyTorch, TensorFlow, scikit-learn, HuggingFace, XGBoost, and everything else
  • Simple to integrate: a few lines of code are enough to start tracking
  • De facto standard: the widest adoption in industry, which makes hiring and documentation easier

Honest limitations

  • The web interface is functional but visually basic, especially compared to W&B
  • Multi-user collaboration requires deploying a dedicated MLflow server (not just a local file)
  • Advanced visualizations (curve comparisons, custom dashboards) are limited
Screenshot of the MLflow web interface: on the left the list of runs with their auto-generated names, on the right a parallel coordinates chart linking max_depth to the validation score, and two bar charts comparing the scores of four runs.
The MLflow UI in comparison mode. The search bar takes queries like metrics.rmse below 1 and params.model equals tree, the left column lists the runs you can show or hide, and the charts on the right put the same metrics side by side. It is functional and readable, but visually plainer than W&B.Source : MLflow blog
MLflow + HuggingFace: the frictionless combo

HuggingFace Transformers has native MLflow integration. Add an MLflow callback to your Trainer and you're done: hyperparameters, per-epoch metrics, learning rate schedule, everything is auto-tracked without writing a single line of custom logging. It's the path of least resistance to get started.

Weights & Biases: when the interface makes the difference

W&B (Weights & Biases) is the SaaS platform that won over the ML community with the quality of its interface. It's genuinely beautiful and pleasant to use.

Features that make the difference

  • Experiment Tracking: interactive dashboards with zoom, filtering, side-by-side curve comparison. You see at a glance which configuration performs best.
  • Sweeps: distributed hyperparameter search with built-in Bayesian optimization. Define the search space, W&B explores intelligently.
  • Artifacts: dataset and model versioning with automatic lineage (which artifact produced which other)
  • Tables: interactive tabular data exploration, perfect for analyzing model errors
  • Reports: collaborative reports mixing charts, analyses, and comments. Ideal for sharing results with the team.
  • Prompts: specialized tracking for LLM chains (prompts, responses, evaluations)
Screenshot of a Weights and Biases workspace showing 49 runs in the left column and, on the right, a grid of panels: val_loss and val_acc curves, a val_acc versus learning rate scatter plot, a parallel coordinates chart, a parameter importance table, and a System section with GPU power usage and memory.
A W&B workspace after a 49-run sweep. The Parameter importance table ranks hyperparameters by their influence on the chosen metric, the parallel coordinates chart shows which batch_size / epochs / learning rate paths lead to the best accuracies, and the System section automatically logs each run's GPU usage.Source : Weights & Biases documentation

Strengths

  • Exceptional interface: intuitive, responsive, visually polished. This is the undisputed strong point.
  • Native collaboration: project sharing, comments on runs, team reports
  • Deep integrations: PyTorch, TensorFlow, HuggingFace, LangChain, Keras, and more
  • Active community: widely used in academic research, many papers share their public W&B logs

Limitations

  • SaaS by default: your data (prompts, metrics, artifacts) is on W&B servers. The self-hosted version exists but is expensive.
  • Paid for teams: free for personal use, but ~$50/month/user for team features
  • Vendor lock-in: advanced features (Sweeps, Reports, Artifacts) are proprietary
W&B has become a standard in ML research

It's now common to see links to public W&B projects in research papers. The community can explore detailed results, compare runs, and reproduce experiments. It's a real plus for open science.

Neptune: the balance between the two

Neptune positions itself between MLflow (open source, basic) and W&B (SaaS, premium). Not as pretty as W&B, but more complete than MLflow.

What it does well

  • Experiment Tracking: flexible structure with hierarchical namespaces. You organize your metadata however you want, with no imposed schema.
  • Model Registry: complete model lifecycle management
  • Experiment comparison: a particularly ergonomic side-by-side interface for comparing dozens of runs
  • Self-hosted: deployable on-premise, important for companies with data constraints

Strengths

  • Ergonomic and detailed comparison interface
  • Flexible metadata structure (no rigid schema to follow)
  • Good value-for-money compared to W&B
  • Self-hosted option to keep control of your data

Limitations

  • Smaller community than MLflow or W&B
  • Fewer LLM-specific features
  • Less visible in academic research

Comparison: who to choose based on your context

CriteriaMLflowW&BNeptune
Open sourceYes, fullyNoNo
Self-hostedYes (free)Yes (paid)Yes (paid)
InterfaceFunctionalExcellentGood
CollaborationBasicExcellentGood
CostFree$$$$$
LLM supportBasicW&B PromptsBasic
Watch out for sensitive data in traces

Experiment traces potentially contain sensitive information: prompts with user data, responses containing PII (Personally Identifiable Information), confidential business metrics. Before sending all of that to a cloud SaaS, check GDPR compliance. Self-hosted solutions (MLflow, Langfuse) offer total control over your data.

Best practices for effective tracking

  • Log automatically: use the native callbacks of frameworks (HuggingFace, PyTorch Lightning) rather than manual logging. Less code, fewer oversights.
  • Version the code: record the Git commit hash with each experiment. Without it, you can't reproduce.
  • Tag intelligently: use tags to categorize your runs (baseline, ablation, final, debug). It makes searching easier later.
  • Compare systematically: define a primary metric and always compare to the baseline. Without a reference point, numbers mean nothing.
  • Document failures: failed experiments are just as instructive as successes. "Learning rate 1e-2 diverges after 100 steps" is valuable information for the whole team.
  • Make it accessible: tracking only has value if the entire team can access it. A tracker nobody checks is a useless tracker.

Experiment tracking isn't glamorous, but it's the foundation of rigorous ML work. It's what separates "I'm doing ML by trial and error" from "I know exactly what I've tried, what worked, and why."

Check your understanding0 / 4

1. A team tracks its hundreds of experiments in a shared spreadsheet. What would a tracking tool give them that the spreadsheet never really will?

2. A lab requires that its training data and metrics never leave its own infrastructure, and has no license budget. Which tool does the page point to for this case?

3. Before connecting tracking to a cloud service, why does the page recommend a GDPR compliance check?

4. Why does the page insist on recording the Git commit hash with every experiment?