Repository navigation
Support buffered SSE with external token staging - #3382
Merged
Merged
Conversation
Contributor
|
🌿 Preview your docs: https://nvidia-preview-pranav-external-capture-streaming.docs.buildwithfern.com/nemo/gym Here are the markdown pages you've updated: |
Contributor
Author
|
/ok to test 0f4034e |
pthombre
force-pushed
the
pranav/external_capture_streaming
branch
from
September 14, 2026 23:26
0f4034e to
949f797
Compare
pthombre
marked this pull request as ready for review
September 14, 2026 23:29
Contributor
Author
|
/ok to test 6e52306 |
Contributor
Author
|
/claude review |
Contributor
|
SHIP — LGTM, no reliability concerns. Reviewed the buffered-SSE + external-staging relaxation with focus on lineage/fingerprint correctness (the part that would silently corrupt training data):
Relaxing streaming from 422→buffered-SSE is an additive change, not a public-API break. |
ananthsub
requested changes
Sep 15, 2026
Allow captured streaming requests to use the existing buffered SSE routes while enforcing non-streaming inference worker requests after overrides. Fingerprint converted Responses items so reasoning and tool-call continuations resolve their staged parent correctly. Add 27 route-level integration cases and document the supported behavior. Signed-off-by: Pranav Thombre <[email protected]>
Extend #3301's finalization boundary to buffered SSE and the compaction adapter. Serialize the client-visible response before committing capture, and persist uncommitted-call failures before releasing terminal events. Restore namespaced tool output before finalization and preserve namespace identity in version 2 fingerprints. Add refusal, conversion, serialization, content-attribution, and failure-durability regressions. Validation: 1,084 Gym tests and 32 NeMo-RL boundary tests pass. A live Qwen3 rollout through the NeMo-RL worker, vLLM, and TransferQueue returns reward 1.0, reconstructs 238 tokens, and attributes the terminal call by content (Slurm job 3772908). Full pre-commit passes; Fern reports zero errors and an unauthenticated redirect-check warning. Signed-off-by: Pranav Thombre <[email protected]>
pthombre
force-pushed
the
pranav/external_capture_streaming
branch
from
September 16, 2026 01:45
6e52306 to
d5bc7dc
Compare
Contributor
Author
|
/ok to test d5bc7dc |
ananthsub
requested changes
Sep 16, 2026
Emit and reconstruct Chat refusal deltas so clients receive the output whose tokens are staged. Require the current fingerprint version when resolving file-backed ledger parents. Add refusal continuation and mixed-version ledger regressions. Validation: 1,172 relevant tests and full pre-commit checks pass. Signed-off-by: Pranav Thombre <[email protected]>
Contributor
|
/ok to test a4402f8 |
ananthsub
approved these changes
Sep 16, 2026
ananthsub
enabled auto-merge
September 16, 2026 22:27
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 16, 2026
lauradang
added a commit
to lauradang/Gym
that referenced
this pull request
Sep 17, 2026
Resolve the vLLM model conflict with NVIDIA-NeMo#3382 (buffered SSE with external token staging) by porting its stream guards into the capture handler path and adapting the new streaming test to wrap the handler's finalize_response. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Laura Dang <[email protected]>
ertkonuk
pushed a commit
that referenced
this pull request
Oct 2, 2026
…tion, not content conversation_digest hashed every request item including the harness's system prompt. OpenCode regenerates that prompt per request with today's date, so the first model call after 00:00 UTC in any running session no longer matched its parent's recorded context: resolve_node returned UNRESOLVED (no_match), the call was poisoned, and the finalizer rejected the whole rollout. In a run whose step spanned 2026-09-24 00:00 UTC, 453 of 512 rollouts (every rollout that made calls on both sides of midnight) became placeholder rows; the healthy rollouts were exactly those that ran entirely before or entirely after midnight. system/developer items now contribute only their role and position to the digest. User, assistant and tool turns are hashed as before, so a summarized or rewritten conversation still fails verification. Reusing the parent's tokens then serves the instruction text the model actually saw, which is what the training rows need. FINGERPRINT_VERSION bumps to 2. [tkonuk: FINGERPRINT_VERSION 3 here, since #3382 already bumps it to 2] Signed-off-by: Tugrul Konuk <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Capture-prefixed requests with
stream: truereturned HTTP 422 when external token staging was enabled. Allow Chat Completions, Responses, and Anthropic Messages clients to use Gym's existing buffered SSE replay with externally staged training tokens. The compaction Responses adapter is covered by the same integration tests.Keep worker requests non-streaming after request overrides and reject conflicting static or per-request streaming overrides. Convert Responses output before fingerprinting so reasoning and tool-call continuations resolve the correct captured parent. Generation completes before SSE replay, so this provides protocol compatibility without reducing time to first content. Training reconstruction reads the staged tokens.
Add 27 route-level cases covering JSON/SSE requests, evaluation capture on/off, worker request enforcement, response IDs, internal-field stripping, token reconstruction, and two-call reasoning/tool continuations.
Validation
3747841): two committed calls, answer4, reward1.0, and reconstruction of 234 tokens including 27 training tokens with finite logprobs.pre-commit run --all-filespassed.Checklist