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.
Python SDK extras
Install optional Python extras to extend the functionality of the W&B Python SDK. Specify the name of the extra you want to install within square brackets afterwandb. The syntax is:
| Extra | Packages included | Install if you |
|---|---|---|
gcp | google-cloud-storage | Use gs:// artifact references. |
aws | boto3, botocore | Use s3:// artifact references. |
azure | azure-identity, azure-storage-blob | Use Azure Blob Storage artifact references. |
media | numpy, moviepy, imageio, pillow, bokeh, soundfile, plotly, rdkit | Log images, video, audio, or plots from raw data (numpy arrays, tensors). |
sweeps | sweeps | Run local sweep controller (wandb.controller()). |
workspaces | wandb-workspaces | Programmatically manage workspaces. |
- GCP
- AWS
- Azure
- Media
- Sweeps
- Workspaces
Use the Dependencies:
gcp extra if you add reference artifacts that start with gs:// URIs.Installation:google-cloud-storage