ray.rllib.core.learner.learner_group.LearnerGroup.remove_module#
- LearnerGroup.remove_module(module_id: str, *, new_should_module_be_updated: Sequence[str] | Callable[[str, MultiAgentBatch | None], bool] | None = None) MultiRLModuleSpec [source]#
Removes a module from the Learner.
- Parameters:
module_id – The ModuleID of the module to be removed.
new_should_module_be_updated – An optional sequence of ModuleIDs or a callable taking ModuleID and SampleBatchType and returning whether the ModuleID should be updated (trained). If None, will keep the existing setup in place. RLModules, whose IDs are not in the list (or for which the callable returns False) will not be updated.
- Returns:
The new MultiRLModuleSpec (after the change has been performed).