Skip to main content

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(...): Run a function or program with configuration parameters specified by server.

controller(...): Public sweep controller constructor.

finish(...): Mark a run as finished, and finish uploading all data.

init(...): Start a new run to track and log to W&B.

log(...): Log a dictionary 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(...): Hook into the torch model to collect gradients and the topology.

Other Members
On this page
Was this page helpful?👍👎