From a2e7f980d07840f73342421cab38c7dea6aedb12 Mon Sep 17 00:00:00 2001 From: Daphne12345 Date: Mon, 13 Jan 2025 10:07:41 +0100 Subject: [PATCH 1/2] Fix for "Problem with HyperBand setup given a total budget #1179" --- smac/intensifier/hyperband_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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, From 75f7e70aaea4d3ae54c2cd5a8aaeb3d27f4798a4 Mon Sep 17 00:00:00 2001 From: Daphne Theodorakopoulos <56087728+daphne12345@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:32:40 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1fdc0def..63603c072 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ - Correct intensifier for Algorithm Configuration Facade (#1162, #1165) - Migrate sphinx docs to mkdocs (#1155) +## Bugfixes +- Fix bug with HyperBand setup given a total budget (#1179) + # 2.2.1 ## Improvements