Skip to main content

sweep

Initialize a hyperparameter sweep.

sweep(
sweep: Union[dict, Callable],
entity: Optional[str] = None,
project: Optional[str] = None,
prior_runs: Optional[List[str]] = None
) -> str

Search for hyperparameters that optimizes a cost function of a machine learning model by testing various combinations.

Make note the unique identifier, sweep_id, that is returned. At a later step provide the sweep_id to a sweep agent.

Args
sweepThe configuration of a hyperparameter search. (or configuration generator). See Sweep configuration structure for information on how to define your sweep. If you provide a callable, ensure that the callable does not take arguments and that it returns a dictionary that conforms to the W&B sweep config spec.
entityThe username or team name where you want to send W&B runs created by the sweep to. Ensure that the entity you specify already exists. If you don't specify an entity, the run will be sent to your default entity, which is usually your username.
projectThe name of the project where W&B runs created from the sweep are sent to. If the project is not specified, the run is sent to a project labeled 'Uncategorized'.
prior_runsThe run IDs of existing runs to add to this sweep.
Returns
sweep_idstr. A unique identifier for the sweep.
Was this page helpful?๐Ÿ‘๐Ÿ‘Ž