ray.rllib.core.learner.learner_group.LearnerGroup.__init__#

LearnerGroup.__init__(*, config: AlgorithmConfig, module_spec: SingleAgentRLModuleSpec | MultiAgentRLModuleSpec | None = None)[source]#

Initializes a LearnerGroup instance.

Parameters:
  • config – The AlgorithmConfig object to use to configure this LearnerGroup. Call the learners(num_learners=...) method on your config to specify the number of learner workers to use. Call the same method with arguments num_cpus_per_learner and/or num_gpus_per_learner to configure the compute used by each Learner worker in this LearnerGroup. Call the training(learner_class=...) method on your config to specify, which exact Learner class to use. Call the rl_module(rl_module_spec=...) method on your config to set up the specifics for your RLModule to be used in each Learner.

  • module_spec – If not already specified in config, a separate overriding RLModuleSpec may be provided via this argument.