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)[source]#

Bases: deephyper.stopper._stopper.Stopper

Stopper based on the asynchronous successive halving algorithm.

Methods

observe

Observe a new objective value.

stop

Returns True if the evaluation should be stopped and False otherwise.

to_json

Returns a dict version of the stopper which can be saved as JSON.

transform_objective

Replaces the currently observed objective by the maximum objective observed from the start.

Attributes

objective

Last observed objective.

observations

Returns a copy of the list of observations with 0-index the budgets and 1-index the objectives.

step

Last observed step.

property objective#

Last observed objective.

property observations#

Returns a copy of the list of observations with 0-index the budgets and 1-index the objectives.

observe(budget: float, objective: float)[source]#

Observe a new objective value.

Parameters
  • budget (float) – the budget used to obtain the objective (e.g., the number of epochs).

  • objective (float) – the objective value to observe (e.g, the accuracy).

property step#

Last observed step.

stop()bool[source]#

Returns True if the evaluation should be stopped and False otherwise.

Returns

(step >= max_steps).

Return type

bool

to_json()#

Returns a dict version of the stopper which can be saved as JSON.

transform_objective(objective: float)#

Replaces the currently observed objective by the maximum objective observed from the start. Identity transformation by default.