ray.rllib.core.learner.learner_group.LearnerGroup.load_module_state#
- LearnerGroup.load_module_state(*, marl_module_ckpt_dir: str | None = None, modules_to_load: Set[str] | None = None, rl_module_ckpt_dirs: Dict[str, str] | None = None) None [source]#
Load the checkpoints of the modules being trained by this LearnerGroup.
load_module_state
can be used 3 ways:- Load a checkpoint for the MultiAgentRLModule being trained by this
LearnerGroup. Limit the modules that are loaded from the checkpoint by specifying the
modules_to_load
argument.
- Load the checkpoint(s) for single agent RLModules that
are in the MultiAgentRLModule being trained by this LearnerGroup.
- Load a checkpoint for the MultiAgentRLModule being trained by this
LearnerGroup and load the checkpoint(s) for single agent RLModules that are in the MultiAgentRLModule. The checkpoints for the single agent RLModules take precedence over the module states in the MultiAgentRLModule checkpoint.
- NOTE: At lease one of marl_module_ckpt_dir or rl_module_ckpt_dirs is
must be specified. modules_to_load can only be specified if marl_module_ckpt_dir is specified.
- Parameters:
marl_module_ckpt_dir – The path to the checkpoint for the MultiAgentRLModule.
modules_to_load – A set of module ids to load from the checkpoint.
rl_module_ckpt_dirs – A mapping from module ids to the path to a checkpoint for a single agent RLModule.