Skip to content

lit_sb3.callbacks.vec_normalize

source module lit_sb3.callbacks.vec_normalize

SaveVecNormalizeCallback — periodically saves VecNormalize statistics.

Classes

source class SaveVecNormalizeCallback(save_freq: int, save_path: str | Path, name_prefix: str | None = None, verbose: int = 0)

Bases : BaseCallback

Callback for saving a :class:~lit_sb3.vec_env.VecNormalize wrapper periodically.

Parameters

  • save_freq : int — Save every save_freq steps.

  • save_path : str | Path — Folder where the VecNormalize pickle is saved.

  • name_prefix : str | None — If set, save timestamped files instead of overwriting a single vecnormalize.pkl.

  • verbose : int — Verbosity level.

Attributes

  • state_key : str — Identifier for the state of the callback.