The wandb library is the Python client for Weights & Biases (W&B), a platform for tracking and visualizing machine learning work from datasets through to production models. You initialize a run with wandb.init(), pass hyperparameters as a config dictionary, and log metrics such as accuracy and loss with run.log(); the values then appear in the W&B web interface per run and per training step.
Runs are grouped into projects, and a with block marks a run as finished on exit or failed if an exception occurs. W&B integrates with common ML frameworks and libraries for experiment tracking and data versioning inside existing projects, and a developer guide covers adding W&B to a new framework. For LLM applications, the separate Weave suite handles tracking, debugging, evaluation, and monitoring of GenAI apps.
The platform runs in three hosting configurations: a multi-tenant cloud managed in W&B's Google Cloud account, a single-tenant dedicated cloud in W&B's AWS, GCP, or Azure accounts with isolated network, compute, and storage per instance, and a self-managed W&B Server deployed in your own cloud account or on-premises infrastructure.
Features
- Experiment tracking: wandb.init() and run.log() record hyperparameters and metrics per training step
- Run management: projects group runs; runs are marked finished or failed automatically when using a with block
- Visualization: the web interface plots logged metrics over steps and lists runs with generated names
- Framework integrations: hooks for common ML frameworks and a guide for instrumenting any library
- Weave for LLM apps: a companion suite for tracing, debugging, evaluating, and monitoring GenAI applications
- Hosting options: multi-tenant cloud, dedicated single-tenant cloud, or self-managed server on AWS, GCP, Azure, or on-premises
- Python version policy: the minimum supported Python version is kept for at least six months after its end-of-life date
