Tutorial - Create sweeps from existing projects
The proceeding tutorial will walk through the steps of how to create sweep jobs from a pre-existing Weights & Biases project. We will use the Fashion MNIST dataset to train a PyTorch convolutional neural network how to classify images. The required code an dataset is located in the Weights & Biases repo: https://github.com/wandb/examples/tree/master/examples/pytorch/pytorch-cnn-fashion
First, create a baseline. Download the PyTorch MNIST dataset example model from Weights & Biases examples GitHub repository. Next, train the model. The training script is within the
- 1.Clone this repo
git clone https://github.com/wandb/examples.git
- 2.Open this example
- 3.Run a run manually
Optionally explore the example appear in the W&B App UI dashboard.
The auto-generated configuration guesses values to sweep over based on the runs you have completed. Edit the configuration to specify what ranges of hyperparameters you want to try. When you launch the sweep, it starts a new process on the hosted W&B sweep server. This centralized service coordinates the agents— the machines that are running the training jobs.
Next, launch an agent locally. You can launch up to 20 agents on different machines in parallel if you want to distribute the work and finish the sweep job more quickly. The agent will print out the set of parameters it’s trying next.
Launch a new sweep using existing runs that you've previously logged.
- 1.Open your project table.
- 2.Select the runs you want to use with checkboxes on the left side of the table.
- 3.Click the dropdown to create a new sweep.
Your sweep will now be set up on our server. All you need to do is launch one or more agents to start running runs.