wandb sweep)
for hyperparameters and use them to run model training.
To start a W&B Sweep agent, provide the W&B Sweep ID that was returned when you initialized a W&B Sweep. The W&B Sweep ID has the form:
- entity: Your W&B username or team name.
- project: The name of the project where you want the output of the W&B Run to be stored. If the project is not specified, the run is put in an “Uncategorized” project.
- sweep_ID: The pseudo random, unique ID generated by W&B.
- CLI
- Python script or notebook
Use the
wandb agent
command to start a sweep. Provide the sweep ID that was returned when you initialized the sweep. Copy and paste the code snippet below and replace sweep_id
with your sweep ID:Stop W&B agent
Random and Bayesian searches will run forever. You must stop the process from the command line, within your python script, or the Sweeps UI.
- Python script or notebook
- CLI
First, initialize your sweep. For more information, see Initialize sweeps.Next, start the sweep job. Provide the sweep ID generated from sweep initiation. Pass an integer value to the count parameter to set the maximum number of runs to try.
If you start a new run after the sweep agent has finished, within the same script or notebook, then you should call
wandb.teardown()
before starting the new run.