Weights & Biases

Also known as: W&B · wandb

On this page 7

Weights & Biases (often written W&B and installed as the Python package wandb) is a machine learning experiment tracking and model management platform that records the configuration, metrics, outputs and artifacts of every training run so that teams can compare, reproduce and share their work. Among AI frameworks & tools, it sits beside the training libraries rather than replacing them: PyTorch, Keras or Hugging Face Transformers do the computation, while W&B keeps the system of record for what was tried and what happened.

The platform was founded in 2017 and became part of the cloud provider CoreWeave in 2025. Its scope has grown from logging loss curves to dataset and model versioning, hyperparameter sweeps, a model registry and Weave, a toolkit for tracing and evaluating applications built on large language models.

How Weights & Biases records a training run

Weights & Biases records a training run by attaching a lightweight client library to the training script, which streams data to a server while the code runs. A call to wandb.init() creates a run inside a project owned by an entity (a user or team), and stores the hyperparameters passed as config. Each later call to wandb.log() sends a dictionary of values, such as loss, accuracy or learning rate, indexed by a step counter.

Alongside explicit logging, the client captures system metrics (GPU utilization, memory, temperature, CPU load), the Git commit and diff, the command line, installed packages and console output. This automatic context is what makes a run reproducible months later, because the record shows not only the result but the exact code state that produced it. Data is written to a local directory first and uploaded asynchronously, so a network interruption rarely stops training.

The table below lists the core objects of the data model and what each one holds.

ObjectWhat it holdsTypical example
EntityOwner of projects and access rightsA research team account
ProjectGroup of comparable runsImage classifier for defect detection
RunOne execution with config, metrics and filesTraining with learning rate 3e-4
ArtifactVersioned dataset, model or other file settrain-data:v7, resnet-ckpt:v12
SweepSearch over a hyperparameter space60 runs exploring batch size and dropout
ReportShareable document with live chartsWeekly results summary for stakeholders
Core objects in the W&B data model

Main components of the platform

The platform is a set of connected modules that share one metadata store, so a model in the registry can be traced back to the run, code and dataset version that created it. This end-to-end lineage is the main reason teams adopt the full suite instead of a plain metrics logger.

Each module answers a different question in the model lifecycle, as the following table summarizes.

ModuleQuestion it answersKey mechanism
ExperimentsWhich configuration performed best?Logged metrics, charts, run comparison
ArtifactsWhich data and model version was used?Content hashing, aliases, lineage graph
SweepsWhich hyperparameters should be used?Grid, random or Bayesian search with agents
TablesWhere does the model fail?Interactive rows of inputs, predictions, labels
RegistryWhich model is approved for production?Linked versions, aliases such as production
WeaveIs an LLM application behaving correctly?Call traces, scorers, evaluation datasets
W&B modules and their purpose

Artifacts deserve particular attention. Files are identified by content checksums, so logging an unchanged dataset does not create a new version, and large data can be stored as references to external buckets instead of being uploaded. Sweeps use a central controller that proposes configurations and lightweight agents that execute them, with optional Hyperband early termination to stop weak runs before they consume a full budget.

W&B competes most directly with MLflow and overlaps with TensorBoard, LangSmith and Langfuse, and the right choice depends mainly on hosting model, licensing and team collaboration needs. The client library is open source under the MIT license, but the server and user interface are proprietary software offered as a hosted service or as a licensed self-managed deployment.

The comparison below covers the attributes that usually decide a selection.

ToolPrimary focusHosting and licenseTypical strength
Weights & BiasesExperiments, artifacts, LLM evaluationHosted or self-managed, commercial serverCollaboration and polished visualization
MLflowTracking, model registry, packagingSelf-hosted or managed, Apache 2.0Open source with no vendor dependency
TensorBoardLocal visualization of logsLocal, Apache 2.0Zero setup for single users
LangSmithTracing and evaluating LLM chainsHosted or self-hosted, commercialTight fit with LangChain and LangGraph
LangfuseLLM observability and prompt managementSelf-hosted or cloud, open coreOpen source LLM tracing
Weights & Biases compared with neighboring tools

Integrating and configuring W&B in practice

Most teams integrate W&B through built-in framework callbacks rather than hand-written logging calls. The Hugging Face Trainer needs only report_to="wandb", PyTorch Lightning provides WandbLogger, and Keras offers a callback, so adoption often takes fewer than ten lines of code.

Configuration choices matter more than installation, and the decision table below covers the most frequent situations.

SituationRecommended settingReason
Cluster nodes without internet accessWANDB_MODE=offline, then wandb syncLogs locally and uploads later
Regulated or confidential dataDedicated cloud or self-managed serverKeeps data inside a controlled boundary
Distributed training on many GPUsLog only from rank 0 or group runsAvoids duplicate and conflicting metrics
Very frequent metric updatesLog every N steps, not every batchReduces overhead and chart clutter
Large datasets in object storageReference artifacts instead of uploadsVersions data without copying it
Configuration decisions for common situations

Limitations and common mistakes

W&B is valuable only when runs are logged consistently, and most problems come from logging discipline rather than the tool itself. The most frequent issues are listed below.

  • Untracked data versions: logging metrics without logging the dataset as an artifact breaks lineage and makes results impossible to reproduce.
  • Inconsistent metric names: writing val_loss in one run and valid/loss in another prevents direct comparison across a project.
  • Sensitive data in logs: tables, media and console output can contain personal data, so privacy rules apply to the tracking server too.
  • Cost and vendor lock-in: seat-based pricing and a proprietary server make migration harder than with self-hosted open source alternatives.
  • Excessive logging overhead: logging large images or histograms every step can slow training and inflate storage use.

A further misconception is that experiment tracking alone guarantees reproducibility. It records the evidence, but random seeds, nondeterministic GPU kernels and changing external data still need to be controlled in the training code.

The simple explanation

Training an AI model is a long series of experiments. Each attempt uses slightly different settings, and after a few weeks nobody remembers which attempt produced the best result or why.

Weights & Biases works like an automatic lab notebook. Every time a model trains, it writes down the settings, draws the progress charts and saves the data and the finished model with a label. Colleagues can open the same page, compare attempts side by side and pick the winner.

The key point is simple: W&B does not train models, it remembers everything about how they were trained, so good results can be explained and repeated.

How it is used in practice

A five-person machine learning team at a manufacturing company is building a model that detects scratches on metal parts from camera images. Over three weeks the engineers run about 140 training runs with different backbones, image sizes and augmentation settings on a shared GPU cluster.

Each run logs its configuration and validation metrics to one W&B project, and the labeled image set is stored as a versioned artifact. A Bayesian sweep of 60 runs narrows the learning rate to a range around 2e-4, and a table of misclassified images shows that most errors come from reflections under one lighting setup. The team adds 400 new images, logs them as dataset version 8 and retrains.

The best model reaches the target recall and is linked in the registry with the alias production. When an auditor later asks which data trained the deployed model, the team answers in minutes by following the lineage graph from the registry entry back to the exact dataset version and Git commit.