diff --git a/CHANGELOG.md b/CHANGELOG.md index 67de90f28..59f852ea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Migrate sphinx docs to mkdocs (#1155) ## Bugfixes +- Fix bug with HyperBand setup given a total budget (#1179) - Fix kwargs for DifferentialEvolution (#1187) # 2.2.1 diff --git a/smac/intensifier/hyperband_utils.py b/smac/intensifier/hyperband_utils.py index 77f6a748c..f9a46366e 100644 --- a/smac/intensifier/hyperband_utils.py +++ b/smac/intensifier/hyperband_utils.py @@ -44,7 +44,11 @@ def determine_HB(min_budget: float, max_budget: float, eta: int = 3) -> dict: _max_iterations[i] = max_iter + 1 total_trials = np.sum([np.sum(v) for v in _n_configs_in_stage.values()]) - total_budget = np.sum([np.sum(v) for v in _budgets_in_stage.values()]) + + total_budget = 0 + for stage in _n_configs_in_stage.keys(): + for b, c in zip(_budgets_in_stage[stage], _n_configs_in_stage[stage]): + total_budget += b * c return { "max_iterations": _max_iterations,