Repository navigation
feat(sc): Add full per-step training data dump - #4347
Merged
Merged
Conversation
kbhardwaj-nvidia
previously approved these changes
Sep 29, 2026
Contributor
|
Thank you @d-molinari. Just 2 tiny comments. Looks great elsewhere. |
Contributor
Could you try "To avoid having PRs blocked in the future, always include Signed-off-by: Author Name [email protected] in every commit message. You can also do this automatically by using the -s flag (i.e., git commit -s)." |
Signed-off-by: Daniele Molinari <[email protected]>
Signed-off-by: Daniele Molinari <[email protected]>
d-molinari
force-pushed
the
dmolinari/pr-sc-dump-train-data
branch
from
October 1, 2026 19:46
fabcf2d to
826781e
Compare
Contributor
Author
|
v2-swe-step4-training-row1-truncated.json |
Contributor
|
LGTM thank you @d-molinari! |
ZhiyuLi-Nvidia
enabled auto-merge (squash)
October 2, 2026 21:23
Contributor
|
/ok to test 826781e |
ZhiyuLi-Nvidia
approved these changes
Oct 3, 2026
3 of 4 tasks
saumishr
added a commit
to saumishr/RL
that referenced
this pull request
Oct 3, 2026
Resolves the conflict with NVIDIA-NeMo#4347 (full per-step training data dump). The dump's two load-bearing pieces -- the pre_seq_error_sample_mask clone and the add_chunk call -- sat inside the in-process advantage body this branch relocates into advantage_stage.py, so git aligned them against unrelated code and left an empty "ours" side on all three hunks. Keeping either side verbatim would have dropped one of the two features. main's hooks that survive the relocation (imports, the TrainDataDump the controller owns, finish_step on the optimizer step) are untouched. The two that moved now live in AdvantageComputer.run, which is the only code that still holds the untruncated tensors: the controller stopped fetching them when the computation moved off it. Because the stage can run in a pool, TrainDataDump is now a sharded writer. Each shard owns train_data_step<N>.jsonl.part-<shard_id> and finish_step merges them in shard order, assigning idx across the merged file -- no single writer sees every row, so no writer can number them. The controller publishes a step it never wrote, which the previous row-counter guard rejected. Sharding also moves the JSON serialization, which is the expensive half of the feature, off the controller. The dump's timing survives the move as a float on AdvantageOutcome and is replayed into the controller's timer, so the train_data_dump metric still reports when the work happened in an actor. Two of main's assertions encoded behaviour this branch changed on purpose: the estimator now receives the prompt-group key rather than the dense prompt matrix, and a pump fixture needed the group_id tag this branch makes mandatory. prompt_ids_for_adv returns to AdvantageConfig as a dump-only column. Verified locally in the CI container before pushing: 1553 passed in the single-controller blast radius, and 4495 passed in a full L0_Unit_Tests_Other with only this node's five known environmental failures (no GPU, no RDMA, no HF access). Signed-off-by: Saurabh Mishra <[email protected]>
1 task
ZhiyuLi-Nvidia
pushed a commit
that referenced
this pull request
Oct 27, 2026
… process async_rl.log_train_data_to_wandb logs the same per-sample rows as log_full_train_data (#4347) to W&B as the table train/train_data. Each advantage-stage process logs the rows it just computed, from memory: no JSON read-back, no tokenizer, no controller fetch. - train_data_rows() is extracted from TrainDataDump.add_chunk, so the dump and W&B hold identical rows. - WandbTrainData sits beside TrainDataDump with the same add_chunk arguments; one background thread attaches to the controller's run in W&B shared mode (x_primary=False, labelled by shard) and logs each chunk on the train/train_data_step axis. Array cells are JSON strings: wandb.Table type-checks every element of a list cell (minutes for a 1 GB step). - Setup pins logger.wandb.id and makes the controller's run the shared-mode primary, since the advantage pool is built before the controller's wandb.init. Requires logger.wandb_enabled. Replaces the per-step summary table from the earlier commits on this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Zhiyu Li <[email protected]>
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 ?
Enable logging of the full training batch for debug purposes.
Usage
Setting
async_rl.log_full_train_data: trueenables saving the training data astrain_data_step<N>.jsonl.Before your PR is "Ready for review"
Pre checks: