Skip to content

feat: sampling pool dispatcher - #354

Merged
ShubyM merged 1 commit into
openrl-dev:mainfrom
ShubyM:feat/sampling-pool-dispatcher
Oct 23, 2026
Merged

ShubyM merged 1 commit into
openrl-dev:mainfrom
ShubyM:feat/sampling-pool-dispatcher

Conversation

@ShubyM

@ShubyM ShubyM commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

PR introduces the dispatcher for sampling pools, building on #352. Each pool keeps its pending requests in a Redis stream and the dispatcher is that stream's one reader. It reads without removing entries, hands each request to a sampler, and saves the first result while deleting the entry in the same transaction, so a sampler that stops never loses a request.

This adds the loop and HttpSampler, which sends through the pool's router to its vllm serve replicas and drops any answer that came from the wrong weights. Weight loading, time slicing, and the switch that puts it to use come in the next PRs.

@ShubyM
ShubyM marked this pull request as ready for review October 21, 2026 21:24
@ShubyM
ShubyM force-pushed the feat/sampling-pool-dispatcher branch from 84e5819 to fe9f5d1 Compare October 21, 2026 21:30
Adds sampling_dispatcher with Dispatcher and HttpSampler. The dispatcher
is the pool's only reader. It reads the stream incrementally, holds each
pending record until its result is saved, keeps up to `concurrency` sends
in flight, and fails a record no replica answers before the deadline.

HttpSampler sends through the pool's router, finds its replicas by pod
label, and drops an answer from a replica that no longer reports the
record's revision. In this commit replicas serve only
the weights they start with, so a record for any other revision fails at
its deadline.

SamplingStore gains pending(after=...) and wait_for_new for the
incremental reads, and returns prompts as array('I') since the
dispatcher holds every pending one in memory.
@ShubyM
ShubyM force-pushed the feat/sampling-pool-dispatcher branch from fe9f5d1 to 89e5102 Compare October 23, 2026 18:10
@ShubyM
ShubyM merged commit 69463bd into openrl-dev:main Oct 23, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants