Sweeps

Hyperparameter search and model optimization with W&B Sweeps

Use W&B Sweeps to automate hyperparameter search and visualize rich, interactive experiment tracking. Pick from popular search methods such as Bayesian, grid search, and random to search the hyperparameter space. Scale and parallelize sweep across one or more machines.

Draw insights from large hyperparameter tuning experiments with interactive dashboards.

How it works

Create a sweep with two W&B CLI commands:

  1. Initialize a sweep
wandb sweep --project <propject-name> <path-to-config file>
  1. Start the sweep agent
wandb agent <sweep-ID>

How to get started

Depending on your use case, explore the following resources to get started with W&B Sweeps:

For a step-by-step video, see: Tune Hyperparameters Easily with W&B Sweeps.


Tutorial: Define, initialize, and run a sweep

Sweeps quickstart shows how to define, initialize, and run a sweep. There are four main steps

Add W&B (wandb) to your code

Add W&B to your Python code script or Jupyter Notebook.

Define a sweep configuration

Learn how to create configuration files for sweeps.

Initialize a sweep

Initialize a W&B Sweep

Start or stop a sweep agent

Start or stop a W&B Sweep Agent on one or more machines.

Parallelize agents

Parallelize W&B Sweep agents on multi-core or multi-GPU machine.

Visualize sweep results

Visualize the results of your W&B Sweeps with the W&B App UI.

Manage sweeps with the CLI

Pause, resume, and cancel a W&B Sweep with the CLI.

Learn more about sweeps

Collection of useful sources for Sweeps.

Manage algorithms locally

Search and stop algorithms locally instead of using the W&B cloud-hosted service.

Sweeps troubleshooting

Troubleshoot common W&B Sweep issues.

Sweeps UI

Describes the different components of the Sweeps UI.

Tutorial: Create sweep job from project

Tutorial on how to create sweep jobs from a pre-existing W&B project.


Last modified January 20, 2025: Add svg logos to front page (#1002) (e1444f4)