Integrating with Weights and Biases

The Spell Weights and Biases integration offers access to Weights and Biases from within Spell. Using this integration allows you to stream run metrics to wandb with minimal overhead.

Enabling the integration

Navigate to the Weights and Biases section of your integration settings page and click on the "Install" button.

Image of integration settings page

This will open a modal asking for your wandb API key. Navigate to the Wandb user settings page. Under API keys use an existing token or create a new token. Copy your token.

Image of the Wandb settings page indicating Api Key location

Paste your token into the modal. Click the "Confirm" button.

Image of integration settings page showing the Wandb modal

The integrations page will change to indicate that the wandb integration is now enabled.

Using wandb within a run

Spell will install the wandb Python package and run wandb login for you automatically immediately prior to run execution. For example, if you run the following test script:

$ spell run --machine-type t4 \
    --github-url https://github.com/spellml/cnn-cifar10.git \
    "python models/wandb_train.py"

The details card for the run will include a W&B Link for this run:

Image of run details page showing Wandb button

Click on "Open" to view the corresponding run metrics in Wandb:

Image of run details page showing Wandb button

Managing the integration

You can change Wandb access keys at any time by visiting the integration settings page.

You can disable the Wandb integration, and possibly reenable it later, in the same place.