eta_utility.eta_x.common.policies module
- class eta_utility.eta_x.common.policies.NoPolicy(*args, squash_output: bool = False, **kwargs)[source]
Bases:
BasePolicy
No Policy allows for the creation of agents which do not use neural networks. It does not implement any of the typical policy functions but is a simple interface that can be used and ignored. There is no need to worry about the implementation details of policies.
- forward(*args: Any, **kwargs: Any) None [source]
No Policy allows for the creation of agents which do not use neural networks. It does not implement any of the typical policy functions but is a simple interface that can be used and ignored. There is no need to worry about the implementation details of policies.
- state_dict(*, destination: dict[str, Any] | None = None, prefix: str = '', keep_vars: bool = False) dict[str, Any] [source]
Returns a dictionary containing a whole state of the module. The dictionary is empty in NoPolicy.
- Parameters:
destination – If provided, the state will be updated into the dictionary and the same object returned.
prefix – Prefix added to parameter and buffer names when composing keys in state_dict.
keep_vars – Determine, which variables will be detached from torch.autograd.
- Returns:
Dictionary with the module/policy state.
- load_state_dict(state_dict: dict[str, Any] | None = None, strict=True) None [source]
Loads the state dictionary. Since the dictionary is always empty, this method doesn’t do anything in NoPolicy.
- state_dict (dict): a dict containing parameters and
persistent buffers.
- strict (bool, optional): whether to strictly enforce that the keys
in
state_dict
match the keys returned by this module’sstate_dict()
function. Default:True