Repository navigation
feat(capture): select which model calls to capture by server and rollout group - #6552
Conversation
Allow named model servers to record whole rollout groups and pause evaluation recording at a configurable free-space floor. Retain the caller server on attributed calls while keeping token capture independent. Signed-off-by: yaoyu-33 <[email protected]>
…re-selection Signed-off-by: yaoyu-33 <[email protected]>
…election The sampling group dropped the `-a<n>` attempt suffix only after a NeMo RL `_g<i>` sibling suffix, so a re-dispatched attempt of a rollout-collection key (`<task>-<rollout>-a<n>`) was sampled apart from its first attempt. Drop the attempt suffix from any key; NeMo RL keys keep the same groups. Document `model_call_capture_servers`, `model_call_capture_sample_every`, `model_call_capture_min_free_gib` and the raw record's `caller_server` field on the model-call capture page. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 40c9dd1 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE — two RISK findings affect capture attribution and retry-consistent sampling.
Reviewed all six changed files, trusted-base AGENTS.md, surrounding implementations, consumers, tests, and existing feedback. There are no prior submitted reviews or inline comments.
CI at 40c9dd11: Unit tests / Test, Unit tests / Server suite, and Lint check passed. The non-blocking mini-SWE harness conformance check failed; its log reports invalid scenario evidence and missing saved model calls. I have not attributed that failure to this change.
Focused probes ran against the admitted head with Python 3.13.14 in 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:main-offline, not the exact CI runtime. They reproduced both findings below. Nine additional JSON/SSE/exception cases preserved training-token capture and context cleanup when evaluation capture was selected out. A filesystem-check error preserved the model response, and Hydra configuration parsing accepted the new settings. No repository CI suites were rerun.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
yfw
left a comment
There was a problem hiding this comment.
SHIP WITH CARE. The defaults, the server list and training token capture work as described. Each new setting has one gap, with a fix in the comments:
- sampling: the group rule (
model_call_capture.py:168-169) - free-space floor: an incomplete marker for the calls it skips (
model_call_capture.py:994-1003) - server list: a warning for a listed name that is not a model server (
model_call_capture.py:1356-1357)
Thank you for this feature. With the defaults, records at base and head match for JSON, streamed, failed and chat calls, apart from the new caller_server. A call that the store leaves out keeps its training token capture. The PR also comes with a docs section and focused tests.
DCO sign-off is on all commits. CI at this head passes the unit tests, the server suite and lint. The non-blocking "Harness conformance / miniswe_sandboxed" job failed with the same message as main's scheduled run at 8bb7fc1 (run). GitHub shows the PR as mergeable, and it waits for an approval.
NeMo RL main does not read the capture store today, so none of these findings changes NeMo RL training data. A trial merge with the open #6235, which also edits model_call_capture.py, shows no conflict.
Generated by Claude Code
… retries Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 555d3a0 |
Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 0b9edb2 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/46531280119 |
Resolve the conflict with #6552 in model_call_capture.py: the claims-file claim now runs on the gated per-call store, and both write paths pass caller_server to _record, which still releases the claim itself. Signed-off-by: Wojciech Prazuch <[email protected]>
What
Three opt-in settings choose which model calls the evaluation capture store records. The defaults still record every call.
flowchart LR C["rollout-prefixed<br/>model call"] --> S{"server in<br/>model_call_capture_servers?"} S -- no --> X["serve the call,<br/>skip evaluation record"] S -- yes --> G{"rollout sampled?<br/>crc32 of logical rollout ID mod N is 0"} G -- no --> X G -- yes --> D{"free space at least<br/>model_call_capture_min_free_gib?"} D -- no --> I["serve the call,<br/>mark capture incomplete if possible"] D -- yes --> R[("capture store<br/>record with caller when known")] classDef new fill:#fff3b0,stroke:#b59f00,color:#000 class S,G,D newmodel_call_capture_serversmodel_call_capture_sample_every1model_call_capture_min_free_gib0(off)Why
With capture on, a long training run records every policy and judge call and can fill the run's filesystem. These settings keep only the calls the run needs and stop recording before the disk fills.
How
Gym hashes the logical rollout ID on each attempt. For example,
12-0and12-0-a1share a decision, whilefoo-a0keeps its literal suffix. NeMo RL supplies a separate rollout ID for each generation, so siblings are sampled independently.Rollout-attributed generation calls through
ServerClientname their caller, including calls that already carry a rollout or training-token prefix. A shared judge can record which environment called it.The model-call capture docs cover the three settings and
caller_server.Compatibility
caller_serverkey. TheModelCallRecordschema stays the same.No separate issue was filed for this opt-in capture change.
Validation
pre-commit run --all-filespassed.python3 tests/unit_tests/test_fern_docs_links.pypassed all 30 checks.npm run checkinfern/found zero errors. Fern skipped its authenticated redirect check.Targeted pytest command
Model rollout evidence is N/A for this change to capture metadata and storage. The middleware tests exercise the conversational judge request through to its stored record.
🤖 Generated with Claude Code