ray.tune.syncer.SyncerCallback
ray.tune.syncer.SyncerCallback#
- class ray.tune.syncer.SyncerCallback(enabled: bool = True, sync_period: float = 300)[source]#
Bases:
ray.tune.callback.Callback
Callback to synchronize trial directories on a worker node with the driver.
DeveloperAPI: This API may change across minor Ray releases.
- on_trial_start(iteration: int, trials: List[Trial], trial: Trial, **info)[source]#
Called after starting a trial instance.
- Parameters
iteration – Number of iterations of the tuning loop.
trials – List of trials.
trial – Trial that just has been started.
**info – Kwargs dict for forward compatibility.
- on_trial_result(iteration: int, trials: List[Trial], trial: Trial, result: Dict, **info)[source]#
Called after receiving a result from a trial.
The search algorithm and scheduler are notified before this hook is called.
- Parameters
iteration – Number of iterations of the tuning loop.
trials – List of trials.
trial – Trial that just sent a result.
result – Result that the trial sent.
**info – Kwargs dict for forward compatibility.
- on_trial_complete(iteration: int, trials: List[Trial], trial: Trial, **info)[source]#
Called after a trial instance completed.
The search algorithm and scheduler are notified before this hook is called.
- Parameters
iteration – Number of iterations of the tuning loop.
trials – List of trials.
trial – Trial that just has been completed.
**info – Kwargs dict for forward compatibility.
- on_trial_error(iteration: int, trials: List[Trial], trial: Trial, **info)[source]#
Called after a trial instance failed (errored).
The search algorithm and scheduler are notified before this hook is called.
- Parameters
iteration – Number of iterations of the tuning loop.
trials – List of trials.
trial – Trial that just has errored.
**info – Kwargs dict for forward compatibility.
- on_checkpoint(iteration: int, trials: List[Trial], trial: Trial, checkpoint: ray.air._internal.checkpoint_manager._TrackedCheckpoint, **info)[source]#
Called after a trial saved a checkpoint with Tune.
- Parameters
iteration – Number of iterations of the tuning loop.
trials – List of trials.
trial – Trial that just has errored.
checkpoint – Checkpoint object that has been saved by the trial.
**info – Kwargs dict for forward compatibility.