Shortcuts

RoundRobinWriter

class torchrl.data.replay_buffers.RoundRobinWriter(compilable: bool = False)[source]

A RoundRobin Writer class for composable replay buffers.

Parameters:

compilable (bool, optional) – whether the writer is compilable. If True, the writer cannot be shared between multiple processes. Defaults to False.

add(data: Any) int | torch.Tensor[source]

Inserts one piece of data at an appropriate index, and returns that index.

extend(data: Sequence) Tensor[source]

Inserts a series of data points at appropriate indices, and returns a tensor containing the indices.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources