Skip to content

fix(verl): pass gts to _dump_generations in _train_step (v0.x) - #591

Open
zzzhang (zzzhang1127) wants to merge 1 commit into
microsoft:v0.xfrom
zzzhang1127:fix/dump-generations-gts
Open

fix(verl): pass gts to _dump_generations in _train_step (v0.x)#591
zzzhang (zzzhang1127) wants to merge 1 commit into
microsoft:v0.xfrom
zzzhang1127:fix/dump-generations-gts

Conversation

@zzzhang1127

Copy link
Copy Markdown

Summary

Fixes #492.

RayPPOTrainer._dump_generations takes gts as a required positional argument, but the _train_step call site on the v0.x line omits it — so any run with trainer.rollout_data_dir set crashes with TypeError: _dump_generations() missing 1 required positional argument: 'gts'.

What this PR does

  • Extracts ground truths at the call site exactly the way upstream verl's own _log_rollout_data does: [item.non_tensor_batch.get("reward_model", {}).get("ground_truth", None) for item in batch].
  • Note the issue's suggested gts=None would just move the crash: _dump_generations indexes gts[i] per sample, so it needs a batch-aligned list (None per sample when no ground truth exists, as is typical for agent rollouts).
  • Removes a leftover debug print(batch.batch.keys()) in the same block.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant