The Weights & Biases Python SDK (wandb package) enables you to train and fine-tune models, and manage models from experimentation to production.
After performing your training and fine-tuning operations with this SDK, you can use the Public API to query and analyze the data that was logged, and the Reports and Workspaces API to generate a web-publishable report summarizing your work.
Installation and setup
Sign up and create an API key
To authenticate your machine with W&B, you must first generate an API key at User settings.
Install and import packages
Install the W&B library.
Import W&B Python SDK:
Last modified on November 6, 2026