Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (37 sloc) 1.15 KB

Sweeps

Use W&B to manage hyperparameter sweeps. Sweeps are useful for efficiently finding the best version of your model. This feature is not currently supported on Windows.

Getting Started

Initialize the project

In your project repo, initialize your project from the command line:

wandb init

Create a sweep configuration

The sweep configuration file specifies your training script, parameter ranges, search strategy and stopping criteria.

Here's an example config file:

program: train.py
method: bayes
metric:
  name: val_loss
  goal: minimize
parameters:
  learning-rate:
    min: 0.001
    max: 0.1
  optimizer:
    values: ["adam", "sgd"]

Initialize the sweep

Run this from the command line to get a SWEEP_ID and a URL to track all your runs.

wandb sweep sweep.yaml # prints out SWEEP_ID.

Run agent(s)

Run one or more wandb agents with the SWEEP_ID. Agents will request parameters from the parameter server and launch your training script.

wandb agent SWEEP_ID

{% page-ref page="configuration.md" %}

{% page-ref page="local-controller.md" %}

{% page-ref page="python-api.md" %}

You can’t perform that action at this time.