ray.rllib.core.rl_module.rl_module.SingleAgentRLModuleSpec#
- class ray.rllib.core.rl_module.rl_module.SingleAgentRLModuleSpec(module_class: Type[RLModule] | None = None, observation_space: gymnasium.Space | None = None, action_space: gymnasium.Space | None = None, model_config_dict: Dict[str, Any] | None = None, catalog_class: Type[Catalog] | None = None, load_state_path: str | None = None)[source]#
Utility spec class to make constructing RLModules (in single-agent case) easier.
- Parameters:
module_class – The RLModule class to use.
observation_space – The observation space of the RLModule. This may differ from the observation space of the environment. For example, a discrete observation space of an environment, would usually correspond to a one-hot encoded observation space of the RLModule because of preprocessing.
action_space – The action space of the RLModule.
model_config_dict – The model config dict to use.
catalog_class – The Catalog class to use.
load_state_path – The path to the module state to load from. NOTE: This must be an absolute path.
Methods
Builds the RLModule from this spec.
Returns a single agent RLModule spec from a serialized representation.
Returns the RLModule config for this spec.
Returns a serialized representation of the spec.
Updates this spec with the given other spec.
Attributes