class_docstr: Implements an exploration strategy for Policies.
  
  An Exploration takes model outputs, a distribution, and a timestep from
  the agent and computes an action to apply to the environment using an
  implemented exploration schema.
class_docstr_tok: ["Implements","an","exploration","strategy","for","Policies",".","An","Exploration","takes","model","outputs",",","a","distribution",",","and","a","timestep","from","the","agent","and","computes","an","action","to","apply","to","the","environment","using","an","implemented","exploration","schema","."]
docstr: Hook for preparations before policy.compute_actions() is called.
  
  Args:
      timestep: An optional timestep tensor.
      explore: An optional explore boolean flag.
      tf_sess: The tf-session object to use.
      **kwargs: Forward compatibility kwargs.
docstr_tok: ["Hook","for","preparations","before","policy.compute_actions","(",")","is","called",".","Args",":","timestep",":","An","optional","timestep","tensor",".","explore",":","An","optional","explore","boolean","flag",".","tf_sess",":","The","tf-session","object","to","use",".","*","*","kwargs",":","Forward","compatibility","kwargs","."]
code: def before_compute_actions(
      self,
      *,
      timestep: Optional[Union[TensorType, int]] = None,
      explore: Optional[Union[TensorType, bool]] = None,
      tf_sess: Optional["tf.Session"] = None,
      **kwargs,
  ):
      """Hook for preparations before policy.compute_actions() is called.
  
      Args:
          timestep: An optional timestep tensor.
          explore: An optional explore boolean flag.
          tf_sess: The tf-session object to use.
          **kwargs: Forward compatibility kwargs.
      """
      pass
  
file_path: ray/python/ray/rllib/utils/exploration/exploration.py
imports: from gymnasium.spaces import Space
  from typing import Dict, List, Optional, Union, TYPE_CHECKING
  from ray.rllib.env.base_env import BaseEnv
  from ray.rllib.models.action_dist import ActionDistribution
  from ray.rllib.models.modelv2 import ModelV2
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.annotations import DeveloperAPI, PublicAPI
  from ray.rllib.utils.framework import try_import_torch, TensorType
  from ray.rllib.utils.typing import LocalOptimizer, AlgorithmConfigDict
label_desc: Use image node_id 2 for calling the Exploration obj's underlying member method code with example usage: obj.before_compute_actions() without return types