ray.rllib.core.learner.learner_group.LearnerGroup.__init__#
- LearnerGroup.__init__(*, config: AlgorithmConfig, module_spec: RLModuleSpec | MultiRLModuleSpec | 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 argumentsnum_cpus_per_learner
and/ornum_gpus_per_learner
to configure the compute used by each Learner worker in this LearnerGroup. Call thetraining(learner_class=...)
method on your config to specify, which exact Learner class to use. Call therl_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.