ray.tune.stopper.function_stopper.FunctionStopper#
- class ray.tune.stopper.function_stopper.FunctionStopper(function: Callable[[str, Dict], bool])[source]#
Bases:
Stopper
Provide a custom function to check if trial should be stopped.
The passed function will be called after each iteration. If it returns True, the trial will be stopped.
- Parameters:
function – Function that checks if a trial should be stopped. Must accept the
trial_id
string andresult
dictionary as arguments. Must return a boolean.
Methods