Hyperband utils
smac.intensifier.hyperband_utils
#
determine_HB
#
Determine one Hyperband round
Parameters#
min_budget : float Minimum budget per trial in fidelity units max_budget : float Maximum budget per trial in fidelity units eta : int, defaults to 3 Input that controls the proportion of configurations discarded in each round of Successive Halving.
Returns#
dict Info about the Hyperband round "max_iterations" "n_configs_in_stage" "budgets_in_stage" "trials_used" "budget_used" "number_of_brackets"
Source code in smac/intensifier/hyperband_utils.py
determine_hyperband_for_multifidelity
#
determine_hyperband_for_multifidelity(
total_budget: float,
min_budget: float,
max_budget: float,
eta: int = 3,
) -> dict
Determine how many Hyperband rounds should happen based on a total budget
Parameters#
total_budget : float Total budget for the complete optimization in fidelity units min_budget : float Minimum budget per trial in fidelity units max_budget : float Maximum budget per trial in fidelity units eta : int, defaults to 3 Input that controls the proportion of configurations discarded in each round of Successive Halving.
Returns#
dict Info about one Hyperband round "max_iterations" "n_configs_in_stage" "budgets_in_stage" "trials_used" "budget_used" "number_of_brackets" Info about whole optimization "n_trials" "total_budget" "eta" "min_budget" "max_budget"
Source code in smac/intensifier/hyperband_utils.py
get_n_trials_for_hyperband_multifidelity
#
get_n_trials_for_hyperband_multifidelity(
total_budget: float,
min_budget: float,
max_budget: float,
eta: int = 3,
print_summary: bool = True,
) -> int
Calculate the number of trials needed for multi-fidelity optimization
Specify the total budget and find out how many trials that equals.
Parameters#
total_budget : float Total budget for the complete optimization in fidelity units. A fidelity unit can be one epoch or a fraction of a dataset size. min_budget : float Minimum budget per trial in fidelity units max_budget : float Maximum budget per trial in fidelity units eta : int, defaults to 3 Input that controls the proportion of configurations discarded in each round of Successive Halving.
Returns#
int Number of trials needed for the specified total budgets
Source code in smac/intensifier/hyperband_utils.py
print_hyperband_summary
#
print_hyperband_summary(hyperband_info: dict) -> None
Print summary about Hyperband as used in the MultiFidelityFacade
Parameters#
hyperband_info : dict Info dict about Hyperband