Skip to content

fix: pass missing gts argument to _dump_generations call#528

Open
Alexi5000 wants to merge 1 commit into
microsoft:mainfrom
Alexi5000:pr/fix-dump-generations-missing-gts
Open

fix: pass missing gts argument to _dump_generations call#528
Alexi5000 wants to merge 1 commit into
microsoft:mainfrom
Alexi5000:pr/fix-dump-generations-missing-gts

Conversation

@Alexi5000
Copy link
Copy Markdown

Summary

  • Pass the missing gts=None argument to _dump_generations() in both AgentLightningTrainer._train_step and EnvAgentLightningTrainer._train_step
  • Remove leftover print(batch.batch.keys()) debug statement from both call sites

Problem

RayPPOTrainer._dump_generations() requires a gts (ground truths) positional argument, but both trainer subclasses omit it. This causes a TypeError at runtime when rollout_data_dir is configured:

TypeError: RayPPOTrainer._dump_generations() missing 1 required positional argument: 'gts'

Ground truth is not available in agent mode training, so None is the correct value.

Fixes #492

Files Changed

  • agentlightning/verl/trainer.pyAgentLightningTrainer._train_step
  • contrib/agentlightning/contrib/algorithm/env_verl/trainer.pyEnvAgentLightningTrainer._train_step

Test plan

  • Run training with rollout_data_dir configured — no TypeError
  • Run training without rollout_data_dir — no behavior change
  • Verify _dump_generations handles gts=None gracefully (base class already supports optional ground truths)

The `RayPPOTrainer._dump_generations()` method requires a `gts` (ground
truths) positional argument, but both `AgentLightningTrainer._train_step`
and `EnvAgentLightningTrainer._train_step` omit it, causing a TypeError
at runtime when `rollout_data_dir` is configured.

Pass `gts=None` since ground truth is not available in agent mode
training. Also remove a leftover `print(batch.batch.keys())` debug
statement from both call sites.

Fixes microsoft#492
Copilot AI review requested due to automatic review settings May 21, 2026 22:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR aligns rollout generation dumping behavior across the two VERL trainer implementations by removing a stray debug print and passing an explicit gts argument into _dump_generations.

Changes:

  • Removed print(batch.batch.keys()) debug output during rollout dumping.
  • Added gts=None to _dump_generations(...) calls in both trainer implementations.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
contrib/agentlightning/contrib/algorithm/env_verl/trainer.py Removes debug print and adds gts=None when dumping generations.
agentlightning/verl/trainer.py Mirrors the same rollout dumping change for consistency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 420 to 426
self._dump_generations(
inputs=inputs,
outputs=outputs,
gts=None,
scores=scores,
reward_extra_infos_dict=reward_extra_infos_dict,
dump_path=rollout_data_dir,
Comment on lines 520 to 526
self._dump_generations(
inputs=inputs,
outputs=outputs,
gts=None,
scores=scores,
reward_extra_infos_dict=reward_extra_infos_dict,
dump_path=rollout_data_dir,
@Alexi5000
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

RayPPOTrainer._dump_generations() missing gts argument in _train_step call

2 participants