AlgorithmConfig.rl_module(*, rl_module_spec: Optional[Union[ray.rllib.core.rl_module.rl_module.SingleAgentRLModuleSpec, ray.rllib.core.rl_module.marl_module.MultiAgentRLModuleSpec]] = <ray.rllib.utils.from_config._NotProvided object>, _enable_rl_module_api: Optional[bool] = <ray.rllib.utils.from_config._NotProvided object>) ray.rllib.algorithms.algorithm_config.AlgorithmConfig[source]#

Sets the config’s RLModule settings.

  • rl_module_spec – The RLModule spec to use for this config. It can be either a SingleAgentRLModuleSpec or a MultiAgentRLModuleSpec. If the observation_space, action_space, catalog_class, or the model config is not specified it will be inferred from the env and other parts of the algorithm config object.

  • _enable_rl_module_api – Whether to enable the RLModule API for this config. By default if you call config.rl_module(...), the RLModule API will NOT be enabled. If you want to enable it, you can call config.rl_module(_enable_rl_module_api=True).


This updated AlgorithmConfig object.