class_docstr: An exploration that adds Ornstein-Uhlenbeck noise to continuous actions.
  
  If explore=True, returns sampled actions plus a noise term X,
  which changes according to this formula:
  Xt+1 = -theta*Xt + sigma*N[0,stddev], where theta, sigma and stddev are
  constants. Also, some completely random period is possible at the
  beginning.
  If explore=False, returns the deterministic action.
class_docstr_tok: ["An","exploration","that","adds","Ornstein-Uhlenbeck","noise","to","continuous","actions",".","If","explore=True",",","returns","sampled","actions","plus","a","noise","term","X",",","which","changes","according","to","this","formula",":","Xt+1","=","-theta","*","Xt","+","sigma","*","N","[","0",",","stddev","]",",","where","theta",",","sigma","and","stddev","are","constants",".","Also",",","some","completely","random","period","is","possible","at","the","beginning",".","If","explore=False",",","returns","the","deterministic","action","."]
code: def set_state(
      self, state: dict, sess: Optional["tf.Session"] = None
  ) -> None:
      if self.framework == "tf":
          self.ou_state.load(state["ou_state"], session=sess)
      elif isinstance(self.ou_state, np.ndarray):
          self.ou_state = state["ou_state"]
      elif torch and torch.is_tensor(self.ou_state):
          self.ou_state = torch.from_numpy(state["ou_state"])
      else:
          self.ou_state.assign(state["ou_state"])
      super().set_state(state, sess=sess)
  
file_path: ray/python/ray/rllib/utils/exploration/ornstein_uhlenbeck_noise.py
imports: import numpy
  from typing import Optional, Union
  from ray.rllib.models.action_dist import ActionDistribution
  from ray.rllib.utils.annotations import override, PublicAPI
  from ray.rllib.utils.exploration.gaussian_noise import GaussianNoise
  from ray.rllib.utils.framework import try_import_tf, try_import_torch, get_variable, TensorType
  from ray.rllib.utils.numpy import convert_to_numpy
  from ray.rllib.utils.schedules import Schedule
  from ray.rllib.utils.tf_utils import zero_logps_from_actions
label_desc: Use image node_id 5 for calling the OrnsteinUhlenbeckNoise obj's underlying member method code with example usage: obj.set_state(state, sess) without return types