Skip to content

[NVBug 6899724] Repair code_gen example.jsonl rows that reject correct answers #4516

Open

Description

@qiaochuz-nv

Queue rank 28/48 · Difficulty 3/5 · Status on main: not_fixed

NVBug: https://nvbugspro.nvidia.com/bug/6899724 · Priority: Unprioritized · ARB: Ananth Subramaniam
GitHub: none found for this defect; related: #820 (different root cause)

Summary

The code_gen README example dataset (data/example.jsonl) ships two rows that score a correct answer as reward 0. Row 2 (Codeforces 1408A) stores 97 of 100 expected outputs with per-case newlines collapsed to spaces, so no consistent print format passes all tests. Row 0 (Codeforces 1259D) bakes in an empty line the statement says is optional. The LCB grader's strict line-count gate turns both into false negatives. Byte-identical on current main.

Reproduction

From a Gym checkout after gym env start built the code_gen venv, run the bug's offline script (Reproduction A) with resources_servers/code_gen/.venv/bin/python. It prints row2 one line per case: reward=0.0 result=[True, True, -2], row0 empty line skipped: reward=0.0 result=[-2], and row2 outputs whose line count != t: 97 of 100.

Root cause

Primary = data. Row 2 unit_tests.outputs[2..98] put all 5 per-case answers on one line (histogram {5 lines: 3, 1 line: 97}); row 0 outputs[0] includes the optional empty line. The grader (testing_util.py get_stripped_lines + the line-count gate at :499-501) rejects on count mismatch before any token comparison; app.py awards reward 1.0 only when every result is True.

Status on main (not_fixed)

HEAD 75bb53e. Blobs identical to cited values: example.jsonl (both copies) 2bab199f3f, testing_util.py 6c91f638e8, app.py dbad60e3b0. example.jsonl last changed in #1467 (2026-06-23). Grader's last change #3051 (Yes/No casing) the bug excludes. No fix found.

Proposed fix

Validation

QA testcase testcases/environments/code_gen.py. Case row2_token_identical_answer_earns_full_reward (decorator at :496, def at :497) is intentionally red until row 2 is fixed; it POSTs a token-identical program to the verifier (no policy model). Re-run readme_input_schema, readme_stack_evaluates_example, and that case via ./run.sh test code_gen; expect mean reward above 0.8.

Triage

Difficulty 3/5 — mechanical data re-split with root cause pinpointed and a red QA case ready, but spans 4 data blobs plus a row-0 design choice. Needs GPU/model: no.

Reviewer notes

Verifier confirmed not_fixed (all six blobs byte-identical) and difficulty 3. Line-reference corrections: the grader line-count gate is at testing_util.py:499-501 (line 498 is blank), and the row2_token_identical_answer_earns_full_reward case has its decorator at :496 with the def at :497.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions