The ConfigGenerator – the strategy of HpBandster

class hpbandster.core.base_config_generator.base_config_generator(logger=None)[source]

The config generator determines how new configurations are sampled. This can take very different levels of complexity, from random sampling to the construction of complex empirical prediction models for promising configurations.

Parameters:
  • directory (string) – where the results are logged
  • logger (logging.logger) – the logger to store the data, defaults to v1
  • overwrite (bool) – whether or not existing data will be overwritten
  • logger – for some debug output
get_config(budget)[source]

function to sample a new configuration

This function is called inside Hyperband to query a new configuration

Parameters:
  • budget (float) – the budget for which this configuration is scheduled
  • returns ((config, info_dict)) – must return a valid configuration and a (possibly empty) info dict
new_result(job, update_model=True)[source]

registers finished runs

Every time a run has finished, this function should be called to register it with the result logger. If overwritten, make sure to call this method from the base class to ensure proper logging.

Parameters:
  • job (instance of hpbandster.distributed.dispatcher.Job) – contains all necessary information about the job
  • update_model (boolean) – determines whether a model inside the config_generator should be updated