Skip to content

RayPPOTrainer._dump_generations() missing gts argument in _train_step call #492

Description

@yunkai-yyk

Bug Report

Describe the bug

In agentlightning/verl/trainer.py, _train_step calls _dump_generations without passing the required gts argument, causing a TypeError at runtime when trainer.rollout_data_dir is set.

Error message

File "agentlightning/verl/trainer.py", line 421, in _train_step
    self._dump_generations(
TypeError: RayPPOTrainer._dump_generations() missing 1 required positional argument: 'gts'

Steps to Reproduce

  1. Set rollout_data_dir in the trainer config
  2. Run training — the error is triggered at the rollout generation dump step

Root Cause

_dump_generations is defined with gts as a required positional argument:

def _dump_generations(self, inputs, outputs, gts, scores, reward_extra_infos_dict, dump_path):

But the call site in _train_step does not pass gts:

self._dump_generations(
    inputs=inputs,
    outputs=outputs,
    scores=scores,
    reward_extra_infos_dict=reward_extra_infos_dict,
    dump_path=rollout_data_dir,
)

Suggested Fix

Either pass gts=None at the call site, or give gts a default value of None in the function signature to make it optional when ground truth is unavailable.

Environment

  • Version: v0.3.0
  • File: agentlightning/verl/trainer.py
  • Class: RayPPOTrainer

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingverl

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions