ray.rllib.algorithms.algorithm_config.AlgorithmConfig.callbacks#
- AlgorithmConfig.callbacks(callbacks_class: ~typing.Type[~ray.rllib.callbacks.callbacks.RLlibCallback] | ~typing.List[~typing.Type[~ray.rllib.callbacks.callbacks.RLlibCallback]] | None = <ray.rllib.utils.from_config._NotProvided object>, *, on_algorithm_init: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_train_result: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_evaluate_start: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_evaluate_end: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_evaluate_offline_start: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_evaluate_offline_end: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_env_runners_recreated: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_offline_eval_runners_recreated: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_checkpoint_loaded: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_environment_created: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_episode_created: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_episode_start: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_episode_step: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_episode_end: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>, on_sample_end: ~typing.Callable | ~typing.List[~typing.Callable] | None = <ray.rllib.utils.from_config._NotProvided object>) Self[source]#
Sets the callbacks configuration.
- Parameters:
callbacks_class – RLlibCallback class, whose methods are called during various phases of training and RL environment sample collection. TODO (sven): Change the link to new rst callbacks page. See the
RLlibCallbackclass andexamples/metrics/custom_metrics_and_callbacks.pyfor more information.on_algorithm_init – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_algorithm_initmethods overridden incallbacks_classtake precedence and are called first. Seeon_algorithm_init()# noqa for more information.on_evaluate_start – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_evaluate_startmethods overridden incallbacks_classtake precedence and are called first. Seeon_evaluate_start()# noqa for more information.on_evaluate_end – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_evaluate_endmethods overridden incallbacks_classtake precedence and are called first. Seeon_evaluate_end()# noqa for more information.on_env_runners_recreated – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_env_runners_recreatedmethods overridden incallbacks_classtake precedence and are called first. Seeon_env_runners_recreated()# noqa for more information.on_checkpoint_loaded – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_checkpoint_loadedmethods overridden incallbacks_classtake precedence and are called first. Seeon_checkpoint_loaded()# noqa for more information.on_environment_created – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_environment_createdmethods overridden incallbacks_classtake precedence and are called first. Seeon_environment_created()# noqa for more information.on_episode_created – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_episode_createdmethods overridden incallbacks_classtake precedence and are called first. Seeon_episode_created()# noqa for more information.on_episode_start – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_episode_startmethods overridden incallbacks_classtake precedence and are called first. Seeon_episode_start()# noqa for more information.on_episode_step – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_episode_stepmethods overridden incallbacks_classtake precedence and are called first. Seeon_episode_step()# noqa for more information.on_episode_end – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_episode_endmethods overridden incallbacks_classtake precedence and are called first. Seeon_episode_end()# noqa for more information.on_sample_end – A callable or a list of callables. If a list, RLlib calls the items in the same sequence.
on_sample_endmethods overridden incallbacks_classtake precedence and are called first. Seeon_sample_end()# noqa for more information.
- Returns:
This updated AlgorithmConfig object.