deephyper.evaluator.callback.SearchEarlyStopping#

class deephyper.evaluator.callback.SearchEarlyStopping(patience: int = 10, objective_func=<function SearchEarlyStopping.<lambda>>)[source]#

Bases: deephyper.evaluator.callback.Callback

Stop the search gracefully when it does not improve for a given number of evaluations.

Parameters
  • patience (int, optional) – The number of not improving evaluations to wait for before stopping the search. Defaults to 10.

  • objective_func (callable, optional) – A function that takes a Job has input and returns the maximized scalar value monitored by this callback. Defaults to lambda j: j.result.

Methods

on_done

Called each time a Job is completed by the Evaluator.

on_launch

Called each time a Job is created by the Evaluator.

on_done(job)[source]#

Called each time a Job is completed by the Evaluator.

Parameters

job (Job) – The completed job.

on_launch(job)#

Called each time a Job is created by the Evaluator.

Parameters

job (Job) – The created job.