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

AlgorithmConfig.api_stack(enable_rl_module_and_learner: str | None = <ray.rllib.utils.from_config._NotProvided object>, enable_env_runner_and_connector_v2: str | 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). If enable_env_runner_and_connector_v2=False, these two classes (RLModule and Learner) will be used along with RolloutWorkers and Policy.

  • 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.

Returns:

This updated AlgorithmConfig object.