class_docstr: Replay Buffers for loading existing data.
docstr: Initialize the FixedReplayBuffer class.
  
  Args:
    data_dir: str, log Directory from which to load the replay buffer.
    observation_shape: tuple of ints.
    stack_size: int, number of frames to use in state stack.
    replay_capacity: int, number of transitions to keep in memory. This can be
      used with `replay_transitions_start_index` to read a subset of replay
      data starting from a specific position.
    batch_size: int, Batch size for sampling data from buffer.
    replay_suffix: int, If not None, then only load the replay buffer
      corresponding to the specific suffix in data directory.
    replay_file_start_index: int, Starting index of the replay buffer to use.
    replay_file_end_index: int, End index of the replay buffer to use.
    replay_transitions_start_index: int, Starting index for loading the data
      from files in `data_dir`. This can be used to read a file starting from
      any index.
    num_buffers_to_load: int, number of replay buffers to load randomly in
      memory at every iteration from all buffers saved in `data_dir`.
    update_horizon: int, length of update ('n' in n-step update).
    gamma: int, the discount factor.
    observation_dtype: np.dtype, type of the observations. Defaults to
      np.uint8 for Atari 2600.
code: def __init__(
      self,
      data_dir,
      observation_shape,
      stack_size,
      replay_capacity,
      batch_size,
      replay_suffix=None,
      replay_file_start_index=0,
      replay_file_end_index=None,
      replay_transitions_start_index=0,
      num_buffers_to_load=5,
      update_horizon=1,
      gamma=0.99,
      observation_dtype=np.uint8,
  ):
      """Initialize the FixedReplayBuffer class.
  
      Args:
        data_dir: str, log Directory from which to load the replay buffer.
        observation_shape: tuple of ints.
        stack_size: int, number of frames to use in state stack.
        replay_capacity: int, number of transitions to keep in memory. This can be
          used with `replay_transitions_start_index` to read a subset of replay
          data starting from a specific position.
        batch_size: int, Batch size for sampling data from buffer.
        replay_suffix: int, If not None, then only load the replay buffer
          corresponding to the specific suffix in data directory.
        replay_file_start_index: int, Starting index of the replay buffer to use.
        replay_file_end_index: int, End index of the replay buffer to use.
        replay_transitions_start_index: int, Starting index for loading the data
          from files in `data_dir`. This can be used to read a file starting from
          any index.
        num_buffers_to_load: int, number of replay buffers to load randomly in
          memory at every iteration from all buffers saved in `data_dir`.
        update_horizon: int, length of update ('n' in n-step update).
        gamma: int, the discount factor.
        observation_dtype: np.dtype, type of the observations. Defaults to
          np.uint8 for Atari 2600.
      """
  
      logging.info(
          "Creating %s with the following parameters:",
          self.__class__.__name__,
      )
      logging.info("\t replay_capacity: %d", replay_capacity)
      logging.info(
          "\t replay_transitions_start_index %d",
          replay_transitions_start_index,
      )
      logging.info(
          "\t replay_file_start_index %d", replay_file_start_index
      )
      logging.info("\t replay_file_end_index %s", replay_file_end_index)
      logging.info("\t replay_suffix %s", replay_suffix)
      logging.info("\t num_buffers_to_load %d", num_buffers_to_load)
  
      self._replay_transitions_start_index = (
          replay_transitions_start_index
      )
      self._num_buffers_to_load = num_buffers_to_load
      super().__init__(
          data_dir=data_dir,
          replay_suffix=replay_suffix,
          replay_file_start_index=replay_file_start_index,
          replay_file_end_index=replay_file_end_index,
          observation_shape=observation_shape,
          stack_size=stack_size,
          replay_capacity=replay_capacity,
          batch_size=batch_size,
          update_horizon=update_horizon,
          gamma=gamma,
          observation_dtype=observation_dtype,
      )
  
file_path: dopamine/dopamine/labs/offline_rl/fixed_replay.py
imports: from absl import logging
  from batch_rl.fixed_replay.replay_memory import fixed_replay_buffer
  from dopamine.replay_memory import circular_replay_buffer
  import gin
  import numpy
  import tensorflow
label_desc: Use image node_id 1 to create a new JaxFixedReplayBuffer object from inherited base classes: fixed_replay_buffer with example: obj = JaxFixedReplayBuffer(data_dir, observation_shape, stack_size, replay_capacity, batch_size, replay_suffix, replay_file_start_index, replay_file_end_index, replay_transitions_start_index, num_buffers_to_load, update_horizon, gamma, observation_dtype)