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
Optionally specify the number of W&B Runs a Sweep agent should try. The following code snippets demonstrate how to set a maximum number of W&B Runs with the CLI and within a Jupyter Notebook, Python script.- 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.