ray.tune.stopper.TimeoutStopper#

class ray.tune.stopper.TimeoutStopper(timeout: Union[int, float, datetime.timedelta])[source]#

Bases: ray.tune.stopper.stopper.Stopper

Stops all trials after a certain timeout.

This stopper is automatically created when the time_budget_s argument is passed to air.RunConfig().

Parameters

timeout – Either a number specifying the timeout in seconds, or a datetime.timedelta object.

PublicAPI: This API is stable across Ray releases.

stop_all()[source]#

Returns true if the experiment should be terminated.