ray.rllib.algorithms.algorithm_config.AlgorithmConfig.api_stack#

AlgorithmConfig.api_stack(enable_rl_module_and_learner: bool | None = <ray.rllib.utils.from_config._NotProvided object>, enable_env_runner_and_connector_v2: bool | None = <ray.rllib.utils.from_config._NotProvided object>) AlgorithmConfig[source]#

Sets the config’s API stack settings.

Parameters:
  • enable_rl_module_and_learner – Enables the usage of RLModule (instead of ModelV2) and Learner (instead of the training-related parts of Policy). Must be used with enable_env_runner_and_connector_v2=True. Together, these two settings activate the “new API stack” of RLlib.

  • enable_env_runner_and_connector_v2 – Enables the usage of EnvRunners (SingleAgentEnvRunner and MultiAgentEnvRunner) and ConnectorV2. When setting this to True, enable_rl_module_and_learner must be True as well. Together, these two settings activate the “new API stack” of RLlib.

Returns:

This updated AlgorithmConfig object.