Shortcuts

Sampling Strategies

Samplers control how data is retrieved from the replay buffer storage.

PrioritizedSampler(max_capacity, alpha, beta)

Prioritized sampler for replay buffer.

PrioritizedSliceSampler(max_capacity, alpha, ...)

Samples slices of data along the first dimension, given start and stop signals, using prioritized sampling.

RandomSampler()

A uniformly random sampler for composable replay buffers.

Sampler()

A generic sampler base class for composable Replay Buffers.

SamplerEnsemble(*samplers[, p, ...])

An ensemble of samplers.

SamplerWithoutReplacement([drop_last, shuffle])

A data-consuming sampler that ensures that the same sample is not present in consecutive batches.

SliceSampler(*[, num_slices, slice_len, ...])

Samples slices of data along the first dimension, given start and stop signals.

SliceSamplerWithoutReplacement(*[, ...])

Samples slices of data along the first dimension, given start and stop signals, without replacement.

Writers

Writers control how data is written to the storage.

RoundRobinWriter([compilable])

A RoundRobin Writer class for composable replay buffers.

TensorDictMaxValueWriter([rank_key, reduction])

A Writer class for composable replay buffers that keeps the top elements based on some ranking key.

TensorDictRoundRobinWriter([compilable])

A RoundRobin Writer class for composable, tensordict-based replay buffers.

Writer([compilable])

A ReplayBuffer base Writer class.

WriterEnsemble(*writers)

An ensemble of writers.

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