ray.rllib.callbacks.callbacks.RLlibCallback#
- class ray.rllib.callbacks.callbacks.RLlibCallback[source]#
Abstract base class for RLlib callbacks (similar to Keras callbacks).
These callbacks can be used for custom metrics and custom postprocessing.
By default, all of these callbacks are no-ops. To configure custom training callbacks, subclass RLlibCallback and then set {“callbacks”: YourCallbacksClass} in the algo config.
Methods
Callback run when a new Algorithm instance has finished setup.
Callback run when an Algorithm has loaded a new state from a checkpoint.
Callback run whenever a new policy is added to an algorithm.
Callback run after one or more EnvRunner actors have been recreated.
Callback run when a new environment object has been created.
Callback run when a new episode is created (but has not started yet!).
Called when an episode is done (after terminated/truncated have been logged).
Callback run right after an Episode has been started.
Called on each episode step (after the action(s) has/have been logged).
Runs when the evaluation is done.
Callback before evaluation starts.
Called at the beginning of Policy.learn_on_batch().
Called immediately after a policy's postprocess_fn is called.
Called at the end of
EnvRunner.sample()
.Callback run when a new sub-environment has been created.
Called at the end of Algorithm.train().