log all trajectory repetitions per training step (not just first)#1388
Open
arteemg wants to merge 2 commits intoNovaSky-AI:mainfrom
Open
log all trajectory repetitions per training step (not just first)#1388arteemg wants to merge 2 commits intoNovaSky-AI:mainfrom
arteemg wants to merge 2 commits intoNovaSky-AI:mainfrom
Conversation
## Problem During training, `log_example` was called only on `response_ids[0]` and `rewards[0]`, meaning only the first of `n_samples_per_prompt` trajectories was ever logged per training step. With `n_samples_per_prompt=8`, 7 out of 8 rollouts were invisible, making it impossible to debug agent behavior across repetitions. ## Change Loop over all trajectories in the batch and log each one, labeled with its `instance_id` and `repetition_id` from `TrajectoryID` (when available), or a fallback index.
Author
|
@SumanthRH could you take a look! thank you in advance! |
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.
Problem
During training,
log_examplewas called only onresponse_ids[0]andrewards[0], meaning only the first ofn_samples_per_prompttrajectories was ever logged per training step. Withn_samples_per_prompt=8, 7 out of 8 rollouts were invisible, making it impossible to debug agent behavior across repetitions.Change
Loop over all trajectories in the batch and log each one, labeled with its
instance_idandrepetition_idfromTrajectoryID(when available), or a fallback index.Example
Run after the fix, with all rollouts for a single contest (4316) being correctly logged:
code_contests_4316_all_reps.log