ListStorage¶
- class torchrl.data.replay_buffers.ListStorage(max_size: int)[source]¶
A storage stored in a list.
- Parameters:
max_size (int) – the maximum number of elements stored in the storage.
- attach(buffer: Any) None ¶
This function attaches a sampler to this storage.
Buffers that read from this storage must be included as an attached entity by calling this method. This guarantees that when data in the storage changes, components are made aware of changes even if the storage is shared with other buffers (eg. Priority Samplers).
- Parameters:
buffer – the object that reads from this storage.