Skip to main content
GitHub source

Usage

wandb agent [OPTIONS] SWEEP_ID

Description

Start a sweep agent. Poll the W&B server for hyperparameter configurations from the sweep and start a run for each configuration. The agent exits when the sweep completes, the sweep is stopped, cancelled, or the --count limit is reached. Find the sweep ID in:
  • The W&B App at https://wandb.ai/entity/project/sweeps. Replace entity and project with your entity and project names.
  • The output of the wandb sweep command when you create a new sweep.
The sweep ID can include the entity and project path (entity/project/sweep_id) or the eight character sweep ID alone.

Examples

Start an agent for a sweep with a sweep ID of “wbyz9876”
wandb agent wbyz9876
Start an agent with a run limit of 10 runs for the sweep
wandb agent --count 10 wbyz9876
Start an agent for a sweep and save it to a project called “sweeps-project” that belongs to the “team-awesome” entity
wandb agent -p sweeps-project -e team-awesome wbyz9876
Forward signals to child runs for clean shutdown
wandb agent --forward-signals wbyz9876

Arguments

NameDefaultType
sweep_idNoneSTR

Options

FlagTypeDescription
--project, -pSTRSet the project to upload runs to. Default: None
--entity, -eSTRSet the entity to scope the project to. Default: None
--countINTMaximum number of runs this agent will execute. Continues until the sweep completes if not set. Default: None
--forward-signals, -fBOOL FlagForward signals (e.g. SIGINT/SIGTERM) to child runs so they can shut down cleanly. Default: False