trw.hparams.params_optimizer_hyperband
¶
Module Contents¶
Classes¶
Implementation of Hyperband: a novel bandit based approach to hyper-parameter optimization 1 |
Functions¶
|
Attributes¶
- trw.hparams.params_optimizer_hyperband.logger¶
- trw.hparams.params_optimizer_hyperband.log_hyperband(msg)¶
- class trw.hparams.params_optimizer_hyperband.HyperParametersOptimizerHyperband(evaluate_fn: Callable[[trw.hparams.params.HyperParameters, float], Tuple[trw.hparams.store.Metrics, trw.basic_typing.History, Any]], loss_fn: Callable[[trw.hparams.store.Metrics], float], max_iter: int = 81, eta: int = 3, repeat: int = 100, log_string: Callable[[str], None] = log_hyperband, always_include_default_hparams_in_each_cycle: bool = True)¶
Bases:
trw.hparams.params_optimizer.HyperParametersOptimizer
Implementation of Hyperband: a novel bandit based approach to hyper-parameter optimization [#]_
- _repeat_one(self, repeat_id, nb_runs, hyper_parameters: trw.hparams.params.HyperParameters, store: Optional[trw.hparams.store.RunStore] = None) Tuple[List[trw.hparams.store.RunResult], int] ¶
Run full Hyperband search
- Parameters
repeat_id – the iteration number
nb_runs – the run number
store – how to store the result
hyper_parameters – the hyper-parameters
- Returns
a tuple of list of runs and number of runs for this iteration og hyperband
- optimize(self, store: Optional[trw.hparams.store.RunStore], hyper_parameters: Optional[trw.hparams.params.HyperParameters] = None) List[trw.hparams.store.RunResult] ¶
Optimize the hyper parameters using Hyperband
- Parameters
store – how to result of each run. Can be None, in this case nothing is exported.
hyper_parameters – the hyper parameters to be optimized. If None, use the global repository
trw.hparams.HyperParameterRepository
- Returns
the results of all the runs