smac.intensification.hyperband

Classes

Hyperband(stats, traj_logger, rng, instances)

Races multiple challengers against an incumbent using Hyperband method.

class smac.intensification.hyperband.Hyperband(stats, traj_logger, rng, instances, instance_specifics=None, cutoff=None, deterministic=False, initial_budget=None, max_budget=None, eta=3, run_obj_time=True, n_seeds=None, instance_order='shuffle_once', adaptive_capping_slackfactor=1.2, min_chall=1, incumbent_selection='highest_executed_budget')[source]

Bases: smac.intensification.parallel_scheduling.ParallelScheduler

Races multiple challengers against an incumbent using Hyperband method.

Implementation from “BOHB: Robust and Efficient Hyperparameter Optimization at Scale” (Falkner et al. 2018)

Hyperband is an extension of the Successive Halving intensifier. Please refer to SuccessiveHalving documentation for more detailed information about the different types of budgets possible and the way instances are handled.

Internally, this class uses the _Hyperband private class which actually implements the hyperband logic. To allow for parallelism, Hyperband can create multiple _Hyperband instances, based on the number of idle workers available.

Parameters
  • stats (smac.stats.stats.Stats) – stats object

  • traj_logger (smac.utils.io.traj_logging.TrajLogger) – TrajLogger object to log all new incumbents

  • rng (np.random.RandomState) –

  • instances (List[str]) – list of all instance ids

  • instance_specifics (Mapping[str, str]) – mapping from instance name to instance specific string

  • cutoff (Optional[int]) – runtime cutoff of TA runs

  • deterministic (bool) – whether the TA is deterministic or not

  • initial_budget (Optional[float]) – minimum budget allowed for 1 run of successive halving

  • max_budget (Optional[float]) – maximum budget allowed for 1 run of successive halving

  • eta (float) – ‘halving’ factor after each iteration in a successive halving run. Defaults to 3

  • run_obj_time (bool) – whether the run objective is runtime or not (if true, apply adaptive capping)

  • n_seeds (Optional[int]) – Number of seeds to use, if TA is not deterministic. Defaults to None, i.e., seed is set as 0

  • instance_order (Optional[str]) – how to order instances. Can be set to: [None, shuffle_once, shuffle] * None - use as is given by the user * shuffle_once - shuffle once and use across all SH run (default) * shuffle - shuffle before every SH run

  • adaptive_capping_slackfactor (float) – slack factor of adpative capping (factor * adpative cutoff)

  • min_chall (int) – minimal number of challengers to be considered (even if time_bound is exhausted earlier). This class will raise an exception if a value larger than 1 is passed.

  • incumbent_selection (str) – How to select incumbent in successive halving. Only active for real-valued budgets. Can be set to: [highest_executed_budget, highest_budget, any_budget] * highest_executed_budget - incumbent is the best in the highest budget run so far (default) * highest_budget - incumbent is selected only based on the highest budget * any_budget - incumbent is the best on any budget i.e., best performance regardless of budget