Skip to content

refactor(grpo): replace _grpo_raw_text monkey-patch with proper data structure #44

Description

@abrichr

Problem

trainer.py:228-231 monkey-patches action._grpo_raw_text = decoded onto a BenchmarkAction dataclass. This is fragile — if BenchmarkAction ever adds __slots__, the attribute silently fails and loss computation falls back to DSL reconstruction (which may differ from what the model actually generated).

Proposed Fix

Replace with a proper wrapper dataclass (e.g., GRPORolloutAction composing BenchmarkAction + raw_text) or store raw outputs in the Rollout/RolloutStep data structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode refactoring

    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