wandb, 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.
Sign up and create an API key
To authenticate your machine with W&B, you must first generate an API key at https://wandb.ai/authorize.Install and import packages
Install the W&B Python SDK usingpip:
Import W&B Python SDK
The following code snippet demonstrates how to import the W&B Python SDK and initialize a run. Replace<team_entity> with your team entity name.
Install optional dependencies
If needed, you can install optional dependencies that extend the functionality of the W&B Python SDK. Replaceextra with the desired optional dependency:
- Install
gcpif you store datasets, models, or artifacts in Google Cloud Storage. - Install
awsif you use Amazon S3 or other AWS-backed storage in your workflows. - Install
mediaif you frequently log large or complex media (images,audio,video) and want better format support.
Supported optional dependencies
The following table lists supported dependencies for the W&B Python SDK and the extras you can install:| Extra | Packages included |
|---|---|
gcp | google-cloud-storage |
aws | boto3, botocore |
azure | azure-identity, azure-storage-blob |
media | numpy, moviepy, imageio, pillow, bokeh, soundfile, plotly, rdkit |
sweeps | sweeps |
workspaces | wandb-workspaces |