smac.intensifier.hyperband_utils

Functions

determine_HB(min_budget, max_budget[, eta])

Determine one Hyperband round

determine_hyperband_for_multifidelity(...[, eta])

Determine how many Hyperband rounds should happen based on a total budget

get_n_trials_for_hyperband_multifidelity(...)

Calculate the number of trials needed for multi-fidelity optimization

print_hyperband_summary(hyperband_info)

Print summary about Hyperband as used in the MultiFidelityFacade

Interfaces

smac.intensifier.hyperband_utils.determine_HB(min_budget, max_budget, eta=3)[source]

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:

Info about the Hyperband round

”max_iterations” “n_configs_in_stage” “budgets_in_stage” “trials_used” “budget_used” “number_of_brackets”

Return type:

dict

smac.intensifier.hyperband_utils.determine_hyperband_for_multifidelity(total_budget, min_budget, max_budget, eta=3)[source]

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:

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”

Return type:

dict

smac.intensifier.hyperband_utils.get_n_trials_for_hyperband_multifidelity(total_budget, min_budget, max_budget, eta=3, print_summary=True)[source]

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:

Number of trials needed for the specified total budgets

Return type:

int

smac.intensifier.hyperband_utils.print_hyperband_summary(hyperband_info)[source]

Print summary about Hyperband as used in the MultiFidelityFacade

Parameters:

hyperband_info (dict) – Info dict about Hyperband

Return type:

None