deephyper.evaluator.callback.SearchEarlyStopping#
- class deephyper.evaluator.callback.SearchEarlyStopping(patience: int = 10, objective_func=<function SearchEarlyStopping.<lambda>>)[source]#
Bases:
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 tolambda j: j.result
.
Methods
Called each time a Job is completed by the Evaluator.
Called each time a Job is collected from an other process.
Called each time a
Job
is created by theEvaluator
.- on_done(job)[source]#
Called each time a Job is completed by the Evaluator.
- Parameters:
job (Job) – The completed job.