Skip to content

Conversation

casteryh
Copy link
Contributor

@casteryh casteryh commented Aug 27, 2025

Summary:
This diff adds a new interface called StatefulSampler and implements a new class called RandomStatefulSampler.

The RandomStatefulSampler class is a stateful sampler that uses Python's random.sample function for deterministic sampling.

Test Plan:
unit tests


Stack created with Sapling. Best reviewed with ReviewStack.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 27, 2025
@casteryh casteryh requested a review from joecummings August 27, 2025 01:23
@casteryh casteryh force-pushed the pr79 branch 2 times, most recently from 02f4775 to 0803784 Compare August 28, 2025 02:02
Summary:
Added `BufferView` and `RawBuffer` interface.

A sampler will operate on a BufferView and return the sampled keys.

A ReplayBuffer will own a RawBuffer and operate on that.

Test Plan:
n/a
Summary:
Implement SimpleRawBuffer, a RawBuffer backed by a python dict.

Test Plan:
unit tests
Summary:
This diff adds a new interface called `StatefulSampler` and implements a new class called `RandomStatefulSampler`.

The `RandomStatefulSampler` class is a stateful sampler that uses Python's `random.sample` function for deterministic sampling.

Test Plan:
unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant