releso.callback.EpisodeLogCallback

class releso.callback.EpisodeLogCallback(episode_log_location: Path, verbose: int = 0, update_n_episodes: int = 1, logger=None)

Bases: BaseCallback

Episode Callback class, even for vectorized environments.

__init__(episode_log_location: Path, verbose: int = 0, update_n_episodes: int = 1, logger=None)

Constructor for the Callback using SB3 interface.

Parameters:
  • episode_log_location (Path) – Path to the episode log.

  • verbose (int, optional) – Verbosity of the callback. Defaults to 0.

  • update_n_episodes (int, optional) – Update the episode every n

  • 1. (episodes. Defaults to)

  • logger (optional) – Logger to use for logging. If None, a default

  • None. (logger is created. Defaults to)

Methods

init_callback(model)

Initialize the callback by saving references to the RL model and the training environment for convenience.

on_rollout_end()

on_rollout_start()

on_step()

This method will be called by the model after each call to env.step().

on_training_end()

on_training_start(locals_, globals_)

update_child_locals(locals_)

Update the references to the local variables on sub callbacks.

update_locals(locals_)

Update the references to the local variables.

Attributes

logger

training_env

model