commonpower.control.configs.algorithms.SB3PPOConfig
- class SB3PPOConfig(*, policy: str = 'MlpPolicy', device: str = 'cpu', batch_size: int = 12, learning_rate: float = 0.0003, n_steps: int = 24, policy_kwargs: dict = {'log_std_init': 0, 'net_arch': {'pi': [64, 64], 'vf': [64, 64]}, 'squash_output': False}, use_sde: bool = False, sde_sample_freq: int = -1, n_epochs: int = 10, gamma: float = 0.99, gae_lambda: float = 0.95, clip_range: float = 0.2, clip_range_vf: float = None, ent_coef: float = 0.0, vf_coef: float = 0.5, max_grad_norm: float = 0.5, normalize_advantage: bool = True)[source]
Bases:
SB3AlgorithmBaseConfigCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
constructcopyReturns a copy of the model.
dictfrom_ormjsonmodel_constructCreates a new instance of the Model class with validated data.
model_copyUsage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#model_copy
model_dumpUsage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump
model_dump_jsonUsage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump_json
model_json_schemaGenerates a JSON schema for a model class.
model_parametrized_nameCompute the class name for parametrizations of generic classes.
model_post_initOverride this method to perform additional initialization after __init__ and model_construct.
model_rebuildTry to rebuild the pydantic-core schema for the model.
model_validateValidate a pydantic model instance.
model_validate_jsonUsage docs: https://docs.pydantic.dev/2.10/concepts/json/#json-parsing
model_validate_stringsValidate the given object with string data against the Pydantic model.
parse_fileparse_objparse_rawschemaschema_jsonupdate_forward_refsvalidateAttributes
model_computed_fieldsConfiguration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extraGet extra fields set during validation.
model_fieldsmodel_fields_setReturns the set of fields that have been explicitly set on this model instance.
n_stepspolicy_kwargsuse_sdesde_sample_freqn_epochsgammagae_lambdaclip_rangeclip_range_vfent_coefvf_coefmax_grad_normnormalize_advantagepolicydevicebatch_sizelearning_rate- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].