Spaces:
Paused
Paused
Commit History
-
fix(rewards): never crash GRPO on malformed completions
siddeshwar-kagatikarTrainer crashed with ``ValueError: invalid literal for int() with base 10: 'none'`` because the model emitted ``"none"`` as a string for an orchestrator integer field. A single bad completion takes down the whole RL run, so harden parsing end-to-end: - Add ``_coerce_int`` that gracefully handles ``None``, booleans, floats (including NaN/inf), and arbitrary strings (``"none"``, ``"N/A"``, ``"2 agents"``). Use it for every orchestrator integer. - Wrap ``decode_completion_text`` and ``parse_generated_task_completion`` in defensive ``try/except`` inside ``GeneratorRewardFunction.__call__``; on any parsing/reward exception, fall through to a graded floor reward so GRPO keeps training and the failure is logged via ``[reward_debug][parse_error]`` / ``[reward_debug][reward_error]``. - Add regression tests for both behaviours. Made-with: Cursord814291