Python Library

Use wandb to track machine learning work.
The most commonly used functions/objects are:
  • wandb.init — initialize a new run at the top of your training script
  • wandb.config — track hyperparameters and metadata
  • wandb.log — log metrics and media over time within your training loop
For guides and examples, see
For scripts and interactive notebooks, see
For reference documentation, see


class Artifact: Flexible and lightweight building block for dataset and model versioning.
class Run: A unit of computation logged by wandb. Typically, this is an ML experiment.


agent(...): Generic agent entrypoint, used for CLI or jupyter.
controller(...): Public sweep controller constructor.
finish(...): Marks a run as finished, and finishes uploading all data.
init(...): Starts a new run to track and log to W&B.
log(...): Logs a dictonary of data to the current run's history.
save(...): Ensure all files matching glob_str are synced to wandb with the policy specified.
sweep(...): Initialize a hyperparameter sweep.
watch(...): Hooks into the torch model to collect gradients and the topology.
Other Members