syne_tune.optimizer.schedulers.searchers.random_searcher module

syne_tune.optimizer.schedulers.searchers.random_searcher.sample_random_config(config_space)[source]
class syne_tune.optimizer.schedulers.searchers.random_searcher.RandomSearcher(config_space, points_to_evaluate=None, random_seed=None)[source]

Bases: SingleObjectiveBaseSearcher

Sample hyperparameter configurations uniformly at random from the given configuration space.

Parameters:
  • config_space (Dict[str, Any]) – The configuration space to sample from.

  • points_to_evaluate (Optional[List[dict]]) – A list of configurations to evaluate initially (in the given order).

  • random_seed (Optional[int]) – Seed used to initialize the random number generators.

suggest()[source]

Sample a new configuration at random

If allow_duplicates == False, this is done without replacement, so previously returned configs are not suggested again.

Return type:

Optional[dict]

Returns:

New configuration, or None

class syne_tune.optimizer.schedulers.searchers.random_searcher.MultiObjectiveRandomSearcher(config_space, points_to_evaluate=None, random_seed=None)[source]

Bases: BaseSearcher

Searcher which randomly samples configurations to try next.

suggest()[source]

Sample a new configuration at random

If allow_duplicates == False, this is done without replacement, so previously returned configs are not suggested again.

Return type:

Optional[dict]

Returns:

New configuration, or None