commonpower.control.configs.algorithms.MAPPOBaseConfig
- class MAPPOBaseConfig(*, algorithm_name: str, seed: int, num_env_steps: int, cuda: bool = False, cuda_deterministic: bool = True, n_training_threads: int = 1, n_rollout_threads: int = 1, n_eval_rollout_threads: int = 1, episode_length: int = 24, share_policy: bool = False, use_centralized_V: bool = True, hidden_size: int = 64, layer_N: int = 1, use_ReLU: bool = True, use_popart: bool = False, use_valuenorm: bool = True, use_feature_normalization: bool = False, use_orthogonal: bool = True, gain: float = 0.01, use_naive_recurrent_policy: bool = False, use_recurrent_policy: bool = False, recurrent_N: int = 1, data_chunk_length: int = 10, lr: float = 0.0005, critic_lr: float = 0.0005, opti_eps: float = 1e-05, weight_decay: float = 0.0, ppo_epoch: int = 15, use_clipped_value_loss: bool = True, clip_param: float = 0.2, num_mini_batch: int = 1, entropy_coef: float = 0.01, value_loss_coef: float = 1.0, use_max_grad_norm: bool = True, max_grad_norm: float = 10.0, use_gae: bool = True, gamma: float = 0.99, gae_lambda: float = 0.95, stacked_frames: int = 1, use_proper_time_limits: bool = False, use_huber_loss: bool = True, use_value_active_masks: bool = False, use_policy_active_masks: bool = False, huber_delta: float = 10.0, use_linear_lr_decay: bool = False, log_interval: int = 1, use_eval: bool = False, eval_interval: int = 25, eval_episodes: int = 32, ifi: float = 0.1, penalty_factor: float = 0.0, log_std_init: float = 0.0)[source]
Bases:
BaseModelCreate 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.
algorithm_nameseednum_env_stepscudacuda_deterministicn_training_threadsn_rollout_threadsn_eval_rollout_threadsepisode_lengthshare_policyuse_centralized_Vhidden_sizelayer_Nuse_ReLUuse_popartuse_valuenormuse_feature_normalizationuse_orthogonalgainuse_naive_recurrent_policyuse_recurrent_policyrecurrent_Ndata_chunk_lengthlrcritic_lropti_epsweight_decayppo_epochuse_clipped_value_lossclip_paramnum_mini_batchentropy_coefvalue_loss_coefuse_max_grad_normmax_grad_normuse_gaegammagae_lambdastacked_framesuse_proper_time_limitsuse_huber_lossuse_value_active_masksuse_policy_active_maskshuber_deltause_linear_lr_decaylog_intervaluse_evaleval_intervaleval_episodesifipenalty_factorlog_std_init- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].