Skip to main content
Use Weights & Biases 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.
Hyperparameter tuning insights

How it works

  1. Define a sweep configuration that specifies the hyperparameters to search and the optimization metric.
  2. Define the training logic that the sweep uses to execute each trial.
  3. Initialize a sweep:
    This returns the sweep ID that you use to start the sweep agent and the sweep scheduler if applicable.
  4. (Optional) If you use an optimization engine, start a sweep scheduler:
  5. Start a sweep agent:
The previous code snippet, and the colab linked on this page, show how to initialize and create a sweep with the Weights & Biases CLI. See the Sweeps walkthrough to use the Python SDK to configure, initialize, and run a sweep.

How to get started

Depending on your use case, explore the following resources to get started with Weights & Biases Sweeps: For a step-by-step video, see: Tune Hyperparameters Easily with Weights & Biases Sweeps.

Notebook examples

The following notebook examples explore how to use Weights & Biases Sweeps for hyperparameter optimization across a variety of frameworks and use cases:
Last modified on November 6, 2026