Home/AI Infrastructure/Weights & Biases
AI Infrastructure
wandb

Weights & Biases

ML TrackingExperiment ManagementModel RegistryDatasetsSweeps

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.

License

MIT (client) / Proprietary (server)

Language

Python / TypeScript

80
Trust
Strong

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

Weekly PyPI downloads
1.2M/wk
GitHub commits (90d)
380
GitHub stars
10.2k
Stack Overflow questions
3.5k
Community health
Very Active
Weighted Trust Score80 / 100

Download Trend

Last 12 months

Tradeoffs & Caveats

Know before you commit

Simple 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

Free tier

Unlimited runs · 100GB storage (personal)

Paid

From $50/user/mo (Teams)

Free tier is generous for individuals and research

Alternative Tools

Other options worth considering

huggingface
Hugging Face89Strong

The GitHub of machine learning — 500k+ models, datasets, and Spaces. The hub for open-source AI with inference APIs, model hosting, and the transformers library powering most of the ML ecosystem.

Often Used Together

Complementary tools that pair well with Weights & Biases

huggingface

Hugging Face

AI Infrastructure

89Strong
View
modal

Modal

AI Infrastructure

75Good
View
replicate

Replicate

AI Infrastructure

82Strong
View
langchain

LangChain

AI Orchestration

96Excellent
View
fastapi

FastAPI

Backend Frameworks

97Excellent
View

Learning Resources

Docs, videos, tutorials, and courses

Get Started

Repository and installation options

View on GitHub

github.com/wandb/wandb

pippip install wandb
npmnpm install @wandb/sdk

Quick 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