Skip to content

Sb3CheckpointArgs

Full path: schola.scripts.sb3.settings.Sb3CheckpointArgs

schola.scripts.sb3.settings.Sb3CheckpointArgs

Sb3CheckpointArgs

Sb3CheckpointArgs(enable_checkpoints: bool = False, checkpoint_dir: Annotated[pathlib._local.Path, Parameter(validator=Path(exists=False, file_okay=False, dir_okay=True, ext=()))] = WindowsPath('ckpt'), save_freq: Annotated[int, Parameter(validator=Number(lt=None, lte=None, gt=None, gte=0, modulo=None))] = 100000, name_prefix_override: str | None = None, export_onnx: bool = False, save_final_policy: bool = False, save_replay_buffer: 'bool' = False, save_vecnormalize: 'bool' = False)

Bases: CheckpointArgs

Methods

ItemDescription
init

Attributes

ItemDescription
checkpoint_dirDirectory to save checkpoints to.
enable_checkpointsEnable saving checkpoints
export_onnxWhether to export the model to ONNX format instead of just saving a checkpoint.
name_prefix_overrideOverride the name prefix for the checkpoint files (e.g. SAC, PPO, etc.).
save_final_policyWhether to save the final policy after training is complete.
save_freqFrequency with which to save checkpoints.
save_replay_bufferWhether to save the replay buffer when saving a checkpoint.
save_vecnormalizeWhether to save the vector normalization statistics when saving a checkpoint.

Parameters

enable_checkpoints (bool)

checkpoint_dir (Annotated[Path, Parameter(validator=(Path(exists=False, file_okay=False, dir_okay=True, ext=()),))])

save_freq (Annotated[int, Parameter(validator=(Number(lt=None, lte=None, gt=None, gte=0, modulo=None),))])

name_prefix_override (str | None)

export_onnx (bool)

save_final_policy (bool)

save_replay_buffer (bool)

save_vecnormalize (bool)

init

__init__(
enable_checkpoints=False,
checkpoint_dir=WindowsPath("ckpt"),
save_freq=100000,
name_prefix_override=None,
export_onnx=False,
save_final_policy=False,
save_replay_buffer=False,
save_vecnormalize=False,
)

Parameters

enable_checkpoints (bool)

checkpoint_dir (Annotated[Path, Parameter(validator=(Path(exists=False, file_okay=False, dir_okay=True, ext=()),))])

save_freq (Annotated[int, Parameter(validator=(Number(lt=None, lte=None, gt=None, gte=0, modulo=None),))])

name_prefix_override (str | None)

export_onnx (bool)

save_final_policy (bool)

save_replay_buffer (bool)

save_vecnormalize (bool)

Returns

None


save_replay_buffer

= False save_replay_buffer: bool

Whether to save the replay buffer when saving a checkpoint. This allows for resuming training from the same state of the replay buffer.


save_vecnormalize

= False save_vecnormalize: bool

Whether to save the vector normalization statistics when saving a checkpoint. This is useful for environments where observations need to be normalized, and it allows for consistent normalization when resuming training.