RoundRobinWriter¶
- class torchrl.data.replay_buffers.RoundRobinWriter(compilable: bool = False)[source]¶
A RoundRobin Writer class for composable replay buffers.
- 参数:
compilable (bool, optional) – whether the writer is compilable. If
True
, the writer cannot be shared between multiple processes. Defaults toFalse
.
- add(data: Any) int | torch.Tensor [source]¶
将一条数据插入到适当的索引,并返回该索引。