get_state#
- RLModule.get_state(components: str | Collection[str] | None = None, *, not_components: str | Collection[str] | None = None, inference_only: bool = False, **kwargs) Dict[str, Any][source]#
Returns the state dict of the module.
- Parameters:
components (str | Collection[str] | None) – Ignored by the default
RLModuleandTorchRLModuleimplementations. Subclasses that have sub-components, such asMultiRLModule, use this to select which sub-components to include in the returned state.not_components (str | Collection[str] | None) – Ignored by the default
RLModuleandTorchRLModuleimplementations. Subclasses that have sub-components, such asMultiRLModule, use this to exclude sub-components from the returned state.inference_only (bool) – Whether the returned state should be an inference-only state (w/o those model components that are not needed for action computations, such as a value function or a target network). Note that setting this to
Falsemight raise an error ifself.inference_onlyis True.**kwargs – Forward compatible kwargs.
- Returns:
This RLModule’s state dict.
- Return type: