deephyper.stopper.SuccessiveHalvingStopper#
- class deephyper.stopper.SuccessiveHalvingStopper(max_steps: int, min_steps: float = 1, reduction_factor: float = 3, min_early_stopping_rate: float = 0, min_competing: int = 0, min_fully_completed=0, epsilon=1e-10)[source]#
Bases:
StopperStopper based on the Asynchronous Successive Halving algorithm (ASHA).
Single-Objective
Multi-Objectives
Failures
✅
❌
✅
The Successive Halving (SHA) was proposed in Non-stochastic Best Arm Identification and Hyperparameter Optimization in the context of a fixed number of hyperparameter configurations. The SHA algorithm was synchronous at the time and therefore not efficient when using parallel ressources. The Sucessive Halving algorithm was then extended to be asynchronous in A System for Massively Parallel Hyperparameter Tuning.
Halving is a technique to reduce the number of configurations to evaluate by a factor of
reduction_factor. The halving schedule is following a geometric progression. The first halving step is done aftermin_stepssteps. The next halving step is done aftermin_steps * reduction_factorsteps. The next halving step is done aftermin_steps * reduction_factor**2steps. And so on.- Parameters:
max_steps (int) – The maximum number of steps to run the evaluation (e.g., number of epochs).
min_steps (float, optional) – The minimum number of steps to run the evaluation. Defaults to
1.reduction_factor (float, optional) – At each halving step the current model is kept only if among the top-
1/reduction_factor*100%. Defaults to3.min_early_stopping_rate (float, optional) – A parameter to delay the halving schedule. Defaults to
0.min_competing (int, optional) – The minimum number of competitors necessary to check the top-k condition. Defaults to
0.min_fully_completed (int, optional) – The minimum number of evaluation evaluated with
max_steps. Defaults to1.
Methods
Observe a new objective value.
Returns
Trueif the evaluation should be stopped andFalseotherwise.Returns a dict version of the stopper which can be saved as JSON.
Replaces currently observed objective by the maximum objective observed from the start.
Attributes
Last observed objective.
Returns copy of the list of observations with 0-index budgets and 1-index objectives.
Last observed step.
- property objective#
Last observed objective.
- property observations: list#
Returns copy of the list of observations with 0-index budgets and 1-index objectives.
- property step#
Last observed step.
- stop() bool[source]#
Returns
Trueif the evaluation should be stopped andFalseotherwise.- Returns:
(step >= max_steps).- Return type:
- to_json()#
Returns a dict version of the stopper which can be saved as JSON.