smac.intensification.simple_intensifier¶
Classes
|
Performs the traditional Bayesian Optimization loop, without instance/seed intensification. |
- class smac.intensification.simple_intensifier.SimpleIntensifier(stats, traj_logger, rng, instances, instance_specifics=None, cutoff=None, deterministic=False, run_obj_time=True, **kwargs)[source]¶
Bases:
smac.intensification.abstract_racer.AbstractRacer
Performs the traditional Bayesian Optimization loop, without instance/seed intensification.
- 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]) – 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)
- get_next_run(challengers, incumbent, chooser, run_history, repeat_configs=True, num_workers=1)[source]¶
Selects which challenger to be used. As in a traditional BO loop, we sample from the EPM, which is the next configuration based on the acquisition function. The input data is read from the runhistory.
- Parameters
challengers (List[Configuration]) – promising configurations
incumbent (Configuration) – incumbent configuration
chooser (smac.optimizer.epm_configuration_chooser.EPMChooser) – optimizer that generates next configurations to use for racing
run_history (smac.runhistory.runhistory.RunHistory) – stores all runs we ran so far
repeat_configs (bool) – if False, an evaluated configuration will not be generated again
num_workers (int) – the maximum number of workers available at a given time.
- Return type
Tuple
[RunInfoIntent
,RunInfo
]- Returns
intent (RunInfoIntent) – Indicator of how to consume the RunInfo object
run_info (RunInfo) – An object that encapsulates the minimum information to evaluate a configuration
- process_results(run_info, incumbent, run_history, time_bound, result, log_traj=True)[source]¶
The intensifier stage will be updated based on the results/status of a configuration execution. Also, a incumbent will be determined.
- Parameters
run_info (RunInfo) – A RunInfo containing the configuration that was evaluated
incumbent (Optional[Configuration]) – Best configuration seen so far
run_history (RunHistory) – stores all runs we ran so far if False, an evaluated configuration will not be generated again
time_bound (float) – time in [sec] available to perform intensify
result (RunValue) – Contain the result (status and other methadata) of exercising a challenger/incumbent.
log_traj (bool) – Whether to log changes of incumbents in trajectory
- Return type
Tuple
[Configuration
,float
]- Returns
incumbent (Configuration()) – current (maybe new) incumbent configuration
inc_perf (float) – empirical performance of incumbent configuration