Skip to content
Snippets Groups Projects
Commit db5e8b91 authored by Isabel Haide's avatar Isabel Haide
Browse files

add wandb notebook

parent e2c483cc
Branches
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
# Experiment Tracking Tutorial: Weights and Biases
Weights and Biases (W&B, [wandb.ai](wandb.ai)) is a machine learning platform for developers to quickly track experiments, visualize results, reproduce models and a lot more. The general concept is to have a platform where you can live track your machine learning trainings and store your models/configurations without having to manage the database by yourself.
%% Cell type:markdown id: tags:
## Sign Up
You have to sign up first in order to use W&B. Go to [wandb.ai/site](wandb.ai/site) and create a **personal** account. Personal accounts can be used for as many experiments as you like and are free of charge.
Additionally, you have to install the W&B library as a python package. You can do this by running the following command:
`pip install wandb`
We have already installed it for you here.
%% Cell type:markdown id: tags:
## Login
To use W&B in your experiments, you need to be logged in on the machine you are running your experiments on. You can either do this in a jupyter notebook/python script by running the following cell and putting in your API key, which you can find [here](https://wandb.ai/authorize):
%% Cell type:code id: tags:
``` python
import wandb
wandb.login()
```
%% Output
Failed to detect the name of this notebook, you can set it manually with the WANDB_NOTEBOOK_NAME environment variable to enable code saving.
wandb: Currently logged in as: ihaide. Use `wandb login --relogin` to force relogin
True
%% Cell type:markdown id: tags:
If you want to log in in a terminal so you don't have to repeat this step every time you run an experiment, you can run the following command and enter your API key after setting up your python environment:
`wandb login`
%% Cell type:markdown id: tags:
## Initialize a Run
You can initialize a run in W&B, adding it to an existing project or creating a new one, as well as adding a config file to this run which tracks the hyperparameters of your experiment and will be stored in the database. You can do this by running the following cell:
%% Cell type:markdown id: tags:
run = wandb.init(project="intro_wandb", config={"learning_rate": 0.01})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment