ray.rllib.policy.policy.Policy.get_state#

Policy.get_state() Dict[str, numpy.array | jnp.ndarray | tf.Tensor | torch.Tensor | dict | tuple][source]#

Returns the entire current state of this Policy.

Note: Not to be confused with an RNN model’s internal state. State includes the Model(s)’ weights, optimizer weights, the exploration component’s state, as well as global variables, such as sampling timesteps.

Note that the state may contain references to the original variables. This means that you may need to deepcopy() the state before mutating it.

Returns:

Serialized local state.