wandb
**Weights & Biases (WandB)** is the **leading experiment tracking and MLOps platform that logs every aspect of machine learning experiments** — hyperparameters, training metrics (loss, accuracy per epoch in real-time), system metrics (GPU utilization, memory), model artifacts, dataset versions, and code snapshots — providing a persistent, shareable record of every experiment that prevents the "which run produced that good result?" problem and enables teams to reproduce, compare, and collaborate on ML experiments at scale.
**What Is WandB?**
- **Definition**: A developer-first ML platform (wandb.ai) that provides experiment tracking (log metrics and hyperparameters), artifact versioning (datasets and models), hyperparameter sweeps, report generation, and team collaboration — all accessible through a simple Python API and web dashboard.
- **The Problem It Solves**: Without experiment tracking, ML practitioners lose track of which hyperparameters produced which results, which dataset version was used, and whether that "great result from last Tuesday" is reproducible. WandB makes every experiment automatically logged, searchable, and reproducible.
- **Market Position**: WandB is the most widely adopted experiment tracking platform, used by OpenAI, NVIDIA, Microsoft, Toyota, and 70,000+ ML practitioners. It competes with MLflow (open-source), Neptune, Comet, and TensorBoard.
**Core Features**
| Feature | What It Does | Why It Matters |
|---------|-------------|---------------|
| **Experiment Tracking** | Logs hyperparams + metrics per step/epoch | Compare 100 runs side-by-side on web dashboard |
| **System Metrics** | GPU utilization, CPU, memory, disk | Identify bottlenecks (GPU at 30% = data loading issue) |
| **Artifacts** | Version control for datasets and models | "Model v3 was trained on Dataset v7" — full lineage |
| **Sweeps** | Distributed hyperparameter search | Grid/Random/Bayesian search with web visualization |
| **Reports** | Collaborative markdown + embedded charts | Share findings with stakeholders |
| **Alerts** | Notify when metrics cross thresholds | "Training loss diverged" → Slack notification |
| **Tables** | Interactive data exploration and comparison | Visualize predictions, confusion matrices, samples |
**Usage**
```python
import wandb
# Initialize experiment
wandb.init(
project="image-classification",
config={"lr": 0.001, "batch_size": 32, "epochs": 50}
)
# Log metrics during training
for epoch in range(50):
train_loss, val_loss, val_acc = train_epoch(model)
wandb.log({
"train/loss": train_loss,
"val/loss": val_loss,
"val/accuracy": val_acc,
"epoch": epoch
})
# Log model artifact
wandb.save("best_model.pt")
wandb.finish()
```
**WandB vs Alternatives**
| Feature | WandB | MLflow | TensorBoard | Neptune |
|---------|-------|--------|-------------|---------|
| **Hosting** | Cloud (free tier) + self-hosted | Self-hosted (open-source) | Local (browser) | Cloud |
| **Setup effort** | 2 lines of code | Moderate | Built into TF/PyTorch | 2 lines of code |
| **Collaboration** | Team dashboards, reports | Basic | None (local) | Team dashboards |
| **Artifact versioning** | Yes | Yes | No | Yes |
| **Sweeps (HPO)** | Built-in | No (separate tool) | No | Built-in |
| **System metrics** | Automatic | Manual | Limited | Automatic |
| **Cost** | Free (academic), paid (enterprise) | Free (open-source) | Free | Free tier + paid |
**WandB is the standard experiment tracking platform for modern machine learning** — providing the persistent, collaborative experiment record that prevents lost results, enables reproducibility, and gives teams full visibility into their ML development lifecycle from hyperparameter exploration to model deployment, through a simple Python API that integrates with every major ML framework.