smac.intensification.intensification module

class smac.intensification.intensification.Intensifier(tae_runner: smac.tae.execute_ta_run.ExecuteTARun, stats: smac.stats.stats.Stats, traj_logger:, rng: mtrand.RandomState, instances: typing.List[str], instance_specifics: typing.Mapping[str, numpy.ndarray] = None, cutoff: int = 65535, deterministic: bool = False, run_obj_time: bool = True, always_race_against: ConfigSpace.configuration_space.Configuration = None, run_limit: int = 2147483647, minR: int = 1, maxR: int = 2000)[source]

Bases: object

Races challengers against an incumbent (a.k.a. SMAC’s intensification procedure).

  • tae_runner (tae.executre_ta_run_*.ExecuteTARun* Object) – target algorithm run executor
  • stats (Stats) – stats object
  • traj_logger (TrajLogger) – TrajLogger object to log all new incumbents
  • rng (np.random.RandomState) –
  • instances (typing.List[str]) – list of all instance ids
  • instance_specifics (typing.Mapping[str,np.ndarray]) – mapping from instance name to instance specific string
  • cutoff (int) – runtime cutoff of TA runs
  • deterministic (bool) – whether the TA is deterministic or not
  • run_obj_time (bool) – whether the run objective is runtime or not (if true, apply adaptive capping)
  • always_race_against (Configuration) – if incumbent changes race this configuration always against new incumbent; can sometimes prevent over-tuning
  • run_limit (int) – Maximum number of target algorithm runs per call to intensify.
  • maxR (int) – Maximum number of runs per config (summed over all calls to intensifiy).
  • minR (int) – Minimum number of run per config (summed over all calls to intensify).
intensify(challengers: typing.List[ConfigSpace.configuration_space.Configuration], incumbent: ConfigSpace.configuration_space.Configuration, run_history: smac.runhistory.runhistory.RunHistory, aggregate_func: typing.Callable, time_bound: float = 2147483647.0, log_traj: bool = True)[source]

Running intensification to determine the incumbent configuration. Side effect: adds runs to run_history

Implementation of Procedure 2 in Hutter et al. (2011).

  • challengers (typing.List[Configuration]) – promising configurations
  • incumbent (Configuration) – best configuration so far
  • run_history (RunHistory) – stores all runs we ran so far
  • aggregate_func (typing.Callable) – aggregate error across instances
  • time_bound (float, optional (default=2 ** 31 - 1)) – time in [sec] available to perform intensify
  • log_traj (bool) – whether to log changes of incumbents in trajectory

  • incumbent (Configuration()) – current (maybe new) incumbent configuration
  • inc_perf (float) – empirical performance of incumbent configuration