fix(verl): pass gts to _dump_generations in _train_step (v0.x) - #591
Open
zzzhang (zzzhang1127) wants to merge 1 commit into
Open
fix(verl): pass gts to _dump_generations in _train_step (v0.x)#591zzzhang (zzzhang1127) wants to merge 1 commit into
zzzhang (zzzhang1127) wants to merge 1 commit into
Conversation
RayPPOTrainer._dump_generations requires a positional gts argument; the call in _train_step omitted it, so any run with trainer.rollout_data_dir set crashed with a TypeError at the dump step. Extract ground truths the same way upstream verl does (non_tensor_batch reward_model.ground_truth, None per sample when absent) — note gts=None would crash inside _dump_generations at gts[i], so an aligned list is required. Also drop a leftover debug print in the same block. Fixes microsoft#492 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Fixes #492.
RayPPOTrainer._dump_generationstakesgtsas a required positional argument, but the_train_stepcall site on thev0.xline omits it — so any run withtrainer.rollout_data_dirset crashes withTypeError: _dump_generations() missing 1 required positional argument: 'gts'.What this PR does
_log_rollout_datadoes:[item.non_tensor_batch.get("reward_model", {}).get("ground_truth", None) for item in batch].gts=Nonewould just move the crash:_dump_generationsindexesgts[i]per sample, so it needs a batch-aligned list (Noneper sample when no ground truth exists, as is typical for agent rollouts).print(batch.batch.keys())in the same block.