Quickstart

Start tracking machine learning experiments in 5 minutes

Build better models more efficiently with Weights & Biases experiment tracking.

1. Set up wandb

Sign up for a free account and install the library wandb in a Python 3 environment from the command line. In a notebook, call wandb.login() in Python istead.

pip install wandb
wandb login

2. Start a new run

Initialize a new run in W&B in your Python script or notebook. wandb.init() will start tracking system metrics and console logs, right out of the box. Run your code, put in your API key when prompted, and you'll see the new run appear in W&B. More about wandb.init() →

import wandb
wandb.init(project="my-test-project")

3. Track metrics

Use wandb.log() to track metrics, or a framework integration for easy instrumentation. More about wandb.log() →

wandb.log({'accuracy': train_acc, 'loss': train_loss})

4. Track hyperparameters

Save hyperparameters so you can quickly compare experiments. More about wandb.config →

wandb.config.dropout = 0.2

What next?

  1. Collaborative Reports: Snapshot results, take notes, and share findings

  2. Data + Model Versioning: Track dependencies and results in your ML pipeline

  3. Data Visualization: Visualize and query datasets and model evaluations

  4. Hyperparameter Tuning: Quickly automate optimizing hyperparameters

Common Questions

Where do I find my API key? Once you've logged in, it will be on the Authorize page.

How do I use W&B in an automated environment? If you are training models in an automated environment where it's inconvenient to run shell commands, such as Google's CloudML, you should look at our guide to configuration with Environment Variables.

Do you offer on-prem installs? Yes, you can self-host W&B Local on your own machines or in a private cloud.

How do I turn off wandb logging temporarily? If you're testing code and want to disable wandb syncing, set the environment variable WANDB_MODE=offline.