ray.rllib.core.rl_module.rl_module.RLModuleConfig#
- class ray.rllib.core.rl_module.rl_module.RLModuleConfig(observation_space: gymnasium.Space = None, action_space: gymnasium.Space = None, inference_only: bool = False, learner_only: bool = False, model_config_dict: ~typing.Dict[str, ~typing.Any] = <factory>, catalog_class: ~typing.Type[Catalog] = None)[source]#
A utility config class to make it constructing RLModules easier.
- Parameters:
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.
inference_only – Whether the RLModule should be configured in its inference-only state, in which those components not needed for action computing (for example a value function or a target network) might be missing. Note that
inference_only=True
ANDlearner_only=True
is not allowed.learner_only – Whether this RLModule should only be built on Learner workers, but NOT on EnvRunners. Useful for RLModules inside a MultiRLModule that are only used for training, for example a shared value function in a multi-agent setup or a world model in a curiosity-learning setup. Note that
inference_only=True
ANDlearner_only=True
is not allowed.model_config_dict – The model config dict to use.
catalog_class – The Catalog class to use.
Methods
Creates a config from a serialized representation.
Returns the catalog for this config.
Returns a serialized representation of the config.
Attributes