commonpower.control.logging_utils.callbacks.WandBSafetyCallback
- class WandBSafetyCallback(verbose: int = 0, model_save_path: str | None = None, model_save_freq: int = 0, gradient_save_freq: int = 0)[source]
Bases:
WandbCallbackCallback for logging safety information during training of a single agent.
- Parameters:
verbose (int) – The verbosity of sb3 output
model_save_path (str) – Path to the folder where the model will be saved, The default value is None so the model is not logged
model_save_freq (int) – Frequency to save the model
gradient_save_freq (int) – Frequency to log gradient. The default value is 0 so the gradients are not logged.
Methods
init_callbackInitialize the callback by saving references to the RL model and the training environment for convenience.
on_rollout_endon_rollout_starton_stepThis method will be called by the model after each call to
env.step().on_training_endon_training_startsave_modelupdate_child_localsUpdate the references to the local variables on sub callbacks.
update_localsUpdate the references to the local variables.
Attributes
modellogger