ray.rllib.core.learner.learner.Learner.get_module_state#

Learner.get_module_state(module_ids: Set[str] | None = None, inference_only: bool = False) Dict[str, Any][source]#

Returns the state of the underlying MultiAgentRLModule.

The output should be numpy-friendly for easy serialization, not framework specific tensors.

Parameters:

module_ids – The ids of the modules to get the weights for. If None, all modules will be returned.

Returns:

A dictionary that holds the state of the modules in a numpy-friendly format.