Weights & Biases
The leading ML experiment tracking, model versioning, and dataset management platform. Log metrics, hyperparameters, and artifacts in 5 lines of code. Used by teams at OpenAI, NVIDIA, and Toyota.
Why Weights & Biases?
Training ML models and need to track experiments and compare runs
Managing model versions and dataset artifacts across a team
Running hyperparameter sweeps to optimize model performance
Signal Breakdown
What drives the Trust Score
Download Trend
Last 12 months
Tradeoffs & Caveats
Know before you commitSimple one-off model training — basic CSV logging may suffice
No internet access in training environment — W&B requires network (offline mode exists but limited)
Very cost-sensitive personal projects — MLflow self-hosted is free
Pricing
Free tier & paid plans
Unlimited runs · 100GB storage (personal)
From $50/user/mo (Teams)
Free tier is generous for individuals and research
Alternative Tools
Other options worth considering
Often Used Together
Complementary tools that pair well with Weights & Biases
Learning Resources
Docs, videos, tutorials, and courses
Get Started
Repository and installation options
View on GitHub
github.com/wandb/wandb
pip install wandbnpm install @wandb/sdkQuick Start
Copy and adapt to get going fast
import wandb
from dataclasses import dataclass
@dataclass
class Config:
learning_rate: float = 1e-3
epochs: int = 20
model: str = "resnet50"
wandb.init(project="image-classifier", config=Config())
config = wandb.config
model = build_model(config.model)
optimizer = torch.optim.Adam(model.parameters(), lr=config.learning_rate)
for epoch in range(config.epochs):
metrics = train_epoch(model, optimizer)
wandb.log({"epoch": epoch, **metrics})
# Save model checkpoint as artifact
if epoch % 5 == 0:
artifact = wandb.Artifact("model-checkpoint", type="model")
artifact.add_file(f"checkpoint_epoch_{epoch}.pt")
wandb.log_artifact(artifact)
wandb.finish()Code Examples
Common usage patterns
Hyperparameter sweep
Automatically search for the best hyperparameters
import wandb
sweep_config = {
"method": "bayes",
"metric": {"goal": "minimize", "name": "val/loss"},
"parameters": {
"learning_rate": {"min": 1e-5, "max": 1e-2},
"batch_size": {"values": [16, 32, 64, 128]},
"optimizer": {"values": ["adam", "sgd", "adamw"]},
"dropout": {"min": 0.1, "max": 0.5},
},
}
def train_sweep():
with wandb.init() as run:
config = run.config
model = build_model(dropout=config.dropout)
train(model, lr=config.learning_rate, batch_size=config.batch_size)
sweep_id = wandb.sweep(sweep_config, project="hyperparameter-search")
wandb.agent(sweep_id, function=train_sweep, count=50)Log images and predictions
Visualize model predictions alongside ground truth
import wandb
import numpy as np
wandb.init(project="object-detection")
for step, (images, labels, predictions) in enumerate(eval_loader):
# Log a table of predictions vs ground truth
columns = ["image", "ground_truth", "prediction", "confidence"]
data = []
for img, label, pred, conf in zip(images, labels, predictions, confidences):
data.append([wandb.Image(img), label, pred, conf])
wandb.log({
"predictions": wandb.Table(columns=columns, data=data),
"val/accuracy": (predictions == labels).float().mean().item(),
}, step=step)Community Notes
Real experiences from developers who've used this tool