xpag.buffers.jax_buffer.RBQueue#

class RBQueue(max_replay_size, dummy_data_sample)#

Bases: Generic[Sample]

Replay buffer.

  • It behaves as a limited size queue (if buffer is full it removes the oldest

    elements when new ones are inserted).

  • It supports batch insertion only (no single element).

Methods

init

rtype:

ReplayBufferState

insert

Insert data in the replay buffer.

size

rtype:

int

insert(buffer_state, samples)#

Insert data in the replay buffer. :type buffer_state: ReplayBufferState :param buffer_state: Buffer state :type samples: TypeVar(Sample) :param samples: Sample to insert with a leading batch size.

Return type:

ReplayBufferState

Returns:

New buffer state.