get_weights#

LearnerGroup.get_weights(module_ids: Collection[str] | None = None) Dict[str, Any][source]#

Convenience method instead of self.get_state(components=…).

Parameters:

module_ids (Collection[str] | None) – An optional collection of ModuleIDs for which to return weights. If None (default), return weights of all RLModules.

Returns:

The results of self.get_state(components='learner/rl_module')['learner']['rl_module'].

Return type:

Dict[str, Any]