Repository navigation
fix(capture): accept capture key names from before the rename - #5317
Merged
Merged
Conversation
#4128 renamed rollout_id to capture_key on the capture wire models and the old CallRecord.capture_key to source_capture_key. Frameworks still on the old names, including NeMo RL main, now fail every rollout with AttributeError or a rejected extra field. Accept the old names as validation aliases and expose them as read-only properties. Serialization still writes only the new names, and a payload that carries both names is rejected. Signed-off-by: Ananth Subramaniam <[email protected]>
Emit a FutureWarning the first time a process passes or reads rollout_id or CallRecord.capture_key, naming the field that replaced it, so frameworks still on the old names learn to migrate without flooding their logs. Signed-off-by: Ananth Subramaniam <[email protected]>
pthombre
approved these changes
Oct 29, 2026
ananthsub
enabled auto-merge
October 29, 2026 16:46
ananthsub
disabled auto-merge
October 29, 2026 16:46
dylanelu
pushed a commit
that referenced
this pull request
Oct 29, 2026
* fix(capture): accept capture key names from before the rename the old CallRecord.capture_key to source_capture_key. Frameworks still on the old names, including NeMo RL main, now fail every rollout with AttributeError or a rejected extra field. Accept the old names as validation aliases and expose them as read-only properties. Serialization still writes only the new names, and a payload that carries both names is rejected. Signed-off-by: Ananth Subramaniam <[email protected]> * fix(capture): warn once when pre-rename capture names are used Emit a FutureWarning the first time a process passes or reads rollout_id or CallRecord.capture_key, naming the field that replaced it, so frameworks still on the old names learn to migrate without flooding their logs. Signed-off-by: Ananth Subramaniam <[email protected]> --------- Signed-off-by: Ananth Subramaniam <[email protected]> (cherry picked from commit 5911d62)
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 changed and why
#4128 renamed
rollout_idtocapture_keyon the token capture wire models, and renamed the oldCallRecord.capture_keytosource_capture_key. These models forbid unknown fields, so a framework still on the old names fails right away. NeMo RL main has not moved to the new names yet; that move is NVIDIA-NeMo/RL#4124, which is still open. Training runs that pick up current Gym with NeMo RL main fail every rollout withAttributeError: 'StagedCallRecord' object has no attribute 'rollout_id'.This change makes the rename backward compatible on the Gym side:
CaptureAdmission,StagedCallBaseSnapshot(and soStagedCallRecordandStagedCallSnapshot),CommitCoords,CaptureLedgerCommit,RolloutManifestandRolloutReceiptacceptrollout_idas an input name forcapture_key, and expose a read-onlyrollout_idproperty.CallRecordaccepts the oldcapture_keyas an input name forsource_capture_key, and exposes a read-onlycapture_keyproperty.ActiveCallexposesrollout_idagain.FutureWarningthat names the field to use instead. Later uses stay quiet, so a framework on the old names sees one warning per renamed field rather than one per rollout.Serialization still writes only the new names, so the wire format and digests do not change. A payload that carries both the old and the new name is rejected rather than resolved silently. The two renames do not collide: the old
capture_keyexisted only onCallRecord, which has no field under that name now.NeMo RL can move to the new names on its own schedule. The aliases and warnings can be removed once it has.
Issue
No issue filed. This fixes a downstream break reported against #4128.
Validation
StagedCallBaseSnapshotwithrollout_id=as a keyword, the way the NeMo RL token sink does. The worker test checksActiveCall.rollout_idand its warning.mainwithout this change, and the warning tests fail without the second commit.pytest -n 16 tests/unit_tests/ -k "capture or checkpoint or rollout_collection or lineage or completion"passes. Three exporter test files fail to import in my venv because the telemetry package is not installed; this change does not touch them.pre-commit run --fileson the changed files passes.Rollout evidence
N/A. The change only widens model validation, adds read aliases and warnings, and leaves the serialized output unchanged. Running NeMo RL main against this branch was not possible locally because its test environment needs Megatron.