hunk.code_window:                     episode.batch_builder.total(),
                       episode.batch_builder.count) + "are buffered in "
                   "the sampler. If this is more than you expected, check that "
                   "that you set a horizon on your environment correctly. Note "
                   "that in multi-agent environments, `sample_batch_size` sets "
                   "the batch size based on environment steps, not the steps of "
                   "individual agents, which can result in unexpectedly large "
  
hunk.labels: keep keep keep replace replace keep keep
hunk.after_edit:                 "that you set a horizon on your environment correctly and that"
                   " it terminates at some point. "
                   "Note: In multi-agent environments, `sample_batch_size` sets "
  
hunk.file_path: rllib/evaluation/sampler.py
hunk.type: replace
file: import gym
  from gym import spaces
  import numpy as np
  
  
  class NormalizeActionWrapper(gym.ActionWrapper):
      """Rescale the action space of the environment."""
  
      def action(self, action):
          if not isinstance(self.env.action_space, spaces.Box):
              return action
  
          # rescale the action
          low, high = self.env.action_space.low, self.env.action_space.high
          scaled_action = low + (action + 1.0) * (high - low) / 2.0
          scaled_action = np.clip(scaled_action, low, high)
  
          return scaled_action
  
      def reverse_action(self, action):
          raise NotImplementedError
  