ray.rllib.utils.replay_buffers.reservoir_replay_buffer.ReservoirReplayBuffer#
- class ray.rllib.utils.replay_buffers.reservoir_replay_buffer.ReservoirReplayBuffer(capacity: int = 10000, storage_unit: str = 'timesteps', **kwargs)[source]#
- Bases: - ReplayBuffer- This buffer implements reservoir sampling. - The algorithm has been described by Jeffrey S. Vitter in “Random sampling with a reservoir”. - Methods - Initializes a ReservoirBuffer instance. - Adds a batch of experiences or other data to this buffer. - Calls the given function with this Actor instance. - Returns the computer's network name. - Returns all local state. - Ping the actor. - Samples - num_itemsitems from this buffer.- Restores all local state to the provided - state.- Returns the stats of this buffer.