ray.rllib.core.learner.learner_group.LearnerGroup#
- class ray.rllib.core.learner.learner_group.LearnerGroup(*, config: AlgorithmConfig = None, module_spec: SingleAgentRLModuleSpec | MultiAgentRLModuleSpec | None = None, max_queue_len: int = 20, learner_spec=None)[source]#
Coordinator of n (possibly remote) Learner workers.
Each Learner worker has a copy of the RLModule, the loss function(s), and one or more optimizers.
PublicAPI (alpha): This API is in alpha and may change before becoming stable.
Methods
Initializes a LearnerGroup instance.
Add a module to the Learners maintained by this LearnerGroup.
Apply additional non-gradient based updates to the Learners.
Calls the given function on each Learner L with the args: (L, **kwargs).
Get the states of this LearnerGroup.
Returns the current stats for the input queue for this learner group.
Get the weights of the MultiAgentRLModule maintained by each Learner.
Load the checkpoints of the modules being trained by this LearnerGroup.
Loads the state of the LearnerGroup.
Remove a module from the Learners maintained by this LearnerGroup.
Saves the state of the LearnerGroup.
Sets the state of this LearnerGroup.
Set the weights of the MultiAgentRLModule maintained by each Learner.
Shuts down the LearnerGroup.
Performs gradient based update(s) on the Learner(s), based on given batch.
Performs gradient based update(s) on the Learner(s), based on given episodes.
Attributes