Python SDK 0.21.3
less than a minute
The W&B Python SDK, accessible at 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.
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 https://wandb.ai/authorize.
Install and import packages
Install the W&B library.
pip install wandb
Import W&B Python SDK:
import wandb
# Specify your team entity
entity = "<team_entity>"
# Project that the run is recorded to
project = "my-awesome-project"
with wandb.init(entity=entity, project=project) as run:
run.log({"accuracy": 0.9, "loss": 0.1})
Feedback
Was this page helpful?
Glad to hear it! If you have more to say, please let us know.
Sorry to hear that. Please tell us how we can improve.