Skip to content

Commit

Permalink
Fix for "Problem with HyperBand setup given a total budget #1179"
Browse files Browse the repository at this point in the history
  • Loading branch information
daphne12345 committed Jan 13, 2025
1 parent 06723ed commit a2e7f98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion smac/intensifier/hyperband_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a2e7f98

Please sign in to comment.