Basic Artifacts With W&B
W&B Artifacts Quickstart
This tutorial shows how to get started with W&B Artifacts very quickly. I finetune a convnet in Keras to identify 10 types of living things in photos: plants, animals, insects, etc. Check out the companion report on W&B
In this example we're using Google Colab as a convenient hosted environment, but you can run your own training scripts from anywhere and visualize metrics with W&B's experiment tracking tool.
Sign up or login
Sign up or login to W&B to see and interact with your experiments in the browser.
Note on Artifacts storage space and deletion
Running this colab end-to-end will create at least 7GB of artifacts in your wandb account (more if you try different experiments, increase the number of epochs or examples, etc). If you'd like to free up this space later, you can
- delete the whole project (top right menu at wandb.ai / USERNAME / PROJECT_NAME /overview), or
- delete individual artifacts (hover on the three vertical dots to the right of the artifact name in the sidebar), or
- delete specific artifact versions through the storage explorer at wandb.ai / storage / USERNAME /PROJECT_NAME.
Download sample data: Nature photos
Note: this stage might take a few minutes (~3.6GB of data). If you end up needing to rerun this cell, comment out the first capture line (change %%capture to #%%capture ) so you can respond to the prompt about re-downloading the dataset (and see the progress bar).
Download subsampled data: 10,000 training images and 2,000 validation images from the iNaturalist dataset, evenly distributed across 10 classes of living things like birds, insects, plants, and mammals (names given in Latin—so Aves, Insecta, Plantae, etc :). We will fine-tune a convolutional neural network already trained on ImageNet on this task: given a photo of a living thing, correctly classify it into one of the 10 classes.
Setup
Start out by installing the experiment tracking library and setting up your free W&B account:
- pip install wandb – Install the W&B library
- import wandb – Import the wandb library
- wandb login – Login to your W&B account so you can log all your metrics in one place
Step 1: Upload raw data
Step 2: Split raw data to prepare for training
Step 3: Train with artifacts and save model
Step 4: Load model for inference
More about Weights & Biases
We're always free for academics and open source projects. Here are some more resources:
- Documentation - Python docs
- Gallery - example reports in W&B
- Articles - blog posts and tutorials
- Community - join our Slack community forum