scheduler, the optimization engine runs in your own environment as a separate process. Start that process after you initialize the sweep. See Configure an optimization engine for engine selection and dependencies.
Before you initialize a sweep, you must have a sweep configuration defined either in a YAML file or a nested Python dictionary object in your script. For more information, see Define sweep configuration.
The following code snippets show how to initialize sweeps with the CLI and within a Jupyter notebook or Python script. Choose the method that matches your workflow.
- Python script or notebook
- CLI
Use the W&B SDK to initialize a sweep. Pass the sweep configuration dictionary to the The
sweep parameter. Optionally set the project parameter to the project name where you want Weights & Biases to store the output of the run. If you don’t specify the project, Weights & Biases puts the run in an “Uncategorized” project.wandb.sweep() function returns the sweep ID. The sweep ID includes the entity name and the project name. Note the sweep ID, which you pass to agents when you start them. With the sweep ID, you’re ready to launch one or more agents to execute runs.scheduler.