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(...): Start one or more sweep agents.

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.

login(...): Set up W&B login credentials.

save(...): Sync one or more files to W&B.

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?👍👎