SB3ScriptArgs
Full path:
schola.scripts.sb3.settings.SB3ScriptArgs
schola.scripts.sb3.settings.SB3ScriptArgs
SB3ScriptArgs
SB3ScriptArgs(timesteps=3000, pbar=False, disable_eval=False, logging_settings=<factory>, resume_settings=<factory>, checkpoint_settings=<factory>, network_architecture_settings=<factory>, algorithm_settings=<factory>, environment_settings=<factory>)Bases: object
Top level dataclass for configuring the script arguments used in the SB3 launcher.
Methods
| Item | Description |
|---|---|
| init | — |
Attributes
| Item | Description |
|---|---|
| disable_eval | Whether to disable running evaluation after training. |
| name_prefix | — |
| pbar | Whether to display a progress bar during training. |
| timesteps | Total number of timesteps to train the agent. |
| logging_settings | Settings for enabling logging and configuring the logging directory. |
| resume_settings | Settings for resuming training from a checkpoint. |
| checkpoint_settings | Settings for enabling checkpointing and configuring the checkpoint directory. |
| network_architecture_settings | Settings for configuring the neural network architecture used for training. |
| algorithm_settings | The settings for the training algorithm to use. |
| environment_settings | Settings for the environment to use during training |
Parameters
timesteps (int)
pbar (bool)
disable_eval (bool)
logging_settings (Annotated[Sb3LoggingArgs, Parameter(name=('*',), group=('Logging Arguments',))])
resume_settings (Annotated[Sb3ResumeArgs, Parameter(name=('*',), group=('Resume Arguments',))])
checkpoint_settings (Annotated[Sb3CheckpointArgs, Parameter(name=('*',), group=('Checkpoint Arguments',))])
network_architecture_settings (Annotated[Sb3NetworkArchitectureArgs, Parameter(name=('*',), group=('Network Architecture Arguments',))])
algorithm_settings (Annotated[PPOSettings | SACSettings, Parameter(parse=False, show=False)])
environment_settings (Annotated[EnvironmentArgs, Parameter(name=('*',), group=('Environment Arguments',))])
init
__init__(timesteps=3000, pbar=False, disable_eval=False, logging_settings=<factory>, resume_settings=<factory>, checkpoint_settings=<factory>, network_architecture_settings=<factory>, algorithm_settings=<factory>, environment_settings=<factory>)Parameters
timesteps (int)
pbar (bool)
disable_eval (bool)
logging_settings (Annotated[Sb3LoggingArgs, Parameter(name=('*',), group=('Logging Arguments',))])
resume_settings (Annotated[Sb3ResumeArgs, Parameter(name=('*',), group=('Resume Arguments',))])
checkpoint_settings (Annotated[Sb3CheckpointArgs, Parameter(name=('*',), group=('Checkpoint Arguments',))])
network_architecture_settings (Annotated[Sb3NetworkArchitectureArgs, Parameter(name=('*',), group=('Network Architecture Arguments',))])
algorithm_settings (Annotated[PPOSettings | SACSettings, Parameter(parse=False, show=False)])
environment_settings (Annotated[EnvironmentArgs, Parameter(name=('*',), group=('Environment Arguments',))])
Returns
None
algorithm_settings
algorithm_settings: Annotated[ PPOSettings | SACSettings, Parameter(parse=False, show=False)]The settings for the training algorithm to use. This can be either PPOSettings or SACSettings, depending on the chosen algorithm. This property allows for easy switching between different algorithms (e.g., PPO or SAC) by simply changing the instance of the settings class. The default is PPOSettings, which is suitable for most environments unless specified otherwise.
checkpoint_settings
checkpoint_settings: Annotated[ Sb3CheckpointArgs, Parameter(name="*", group="Checkpoint Arguments")]Settings for enabling checkpointing and configuring the checkpoint directory.
disable_eval
= False disable_eval: boolWhether to disable running evaluation after training. When set to True, it will skip evaluation after training completes.
environment_settings
environment_settings: Annotated[ EnvironmentArgs, Parameter(name="*", group="Environment Arguments")]Settings for the environment to use during training
logging_settings
logging_settings: Annotated[ Sb3LoggingArgs, Parameter(name="*", group="Logging Arguments")]Settings for enabling logging and configuring the logging directory.
name_prefix
name_prefixnetwork_architecture_settings
network_architecture_settings: Annotated[ Sb3NetworkArchitectureArgs, Parameter(name="*", group="Network Architecture Arguments"),]Settings for configuring the neural network architecture used for training.
pbar
= False pbar: boolWhether to display a progress bar during training. Requires TQDM and Rich to be installed.
resume_settings
resume_settings: Annotated[Sb3ResumeArgs, Parameter(name="*", group="Resume Arguments")]Settings for resuming training from a checkpoint.
timesteps
= 3000 timesteps: intTotal number of timesteps to train the agent. This is the total number of environment steps that will be used for training. This should be set based on the complexity of the environment and the desired training duration. A higher value will typically lead to better performance but will also increase training time.