releso.callback.StepLogCallback
- class releso.callback.StepLogCallback(step_log_location: Path, verbose: int = 0, update_n_steps: int = 0, log_infos: bool = False, logger=None)
Bases:
BaseCallbackStep Callback class.
This class tracks all step-wise information that might come in handy during evaluation. Originally created to easily track the actions undertaken in each episode for better evaluation of the learned policy.
- __init__(step_log_location: Path, verbose: int = 0, update_n_steps: int = 0, log_infos: bool = False, logger=None)
Constructor for the Callback using SB3 interface.
- Parameters:
step_log_location (Path) – Path to the step log file.
verbose (int, optional) – Verbosity of the callback. Defaults to 0.
update_every (int, optional) – Update the step log file every n
episode. (steps. Defaults to 0 which triggers the update after every)
log_infos (bool, optional) – Whether to log the infos. Defaults to
False.
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
loggertraining_envmodel