class_docstr: A replay buffer that stores and can sample whole episodes.
  
  This buffer only stores valid steps, and doesn't require paths to
  have a maximum length.
  
  Args:
      capacity_in_transitions (int): Total memory allocated for the buffer.
      env_spec (EnvSpec): Environment specification.
class_docstr_tok: ["A","replay","buffer","that","stores","and","can","sample","whole","episodes",".","This","buffer","only","stores","valid","steps",",","and","does","n't","require","paths","to","have","a","maximum","length",".","Args",":","capacity_in_transitions","(","int",")",":","Total","memory","allocated","for","the","buffer",".","env_spec","(","EnvSpec",")",":","Environment","specification","."]
docstr: Sample a batch of transitions from the buffer.
  
  Args:
      batch_size (int): Number of transitions to sample.
  
  Returns:
      dict: A dict of arrays of shape (batch_size, flat_dim).
docstr_tok: ["Sample","a","batch","of","transitions","from","the","buffer",".","Args",":","batch_size","(","int",")",":","Number","of","transitions","to","sample",".","Returns",":","dict",":","A","dict","of","arrays","of","shape","(","batch_size",",","flat_dim",")","."]
code: def sample_transitions(self, batch_size):
      """Sample a batch of transitions from the buffer.
  
      Args:
          batch_size (int): Number of transitions to sample.
  
      Returns:
          dict: A dict of arrays of shape (batch_size, flat_dim).
  
      """
      idx = np.random.randint(self._transitions_stored, size=batch_size)
      return {
          key: buf_arr[idx] for key, buf_arr in self._buffer.items()
      }
  
file_path: garage/src/garage/replay_buffer/path_buffer.py
imports: import collections
  import numpy
  from garage import StepType, TimeStepBatch
label_desc: Use image node_id 5 for calling the PathBuffer obj's underlying member method code with example usage: obj.sample_transitions(batch_size) and returns: unknown