diff --git a/src/projected_grpo/regrade_pool.py b/src/projected_grpo/regrade_pool.py index 4bd5250..439cf79 100644 --- a/src/projected_grpo/regrade_pool.py +++ b/src/projected_grpo/regrade_pool.py @@ -32,22 +32,18 @@ from loguru import logger from tabulate import tabulate from .rewards import compute_reward -from .train import DATA, RH_HINT_REPLACE_FROM, RH_HINT_REPLACE_TO # reuse dataset path constant +from .train import DATA # reuse dataset path constant def load_problems_by_id() -> dict[int, dict]: + # NB: we score against the bare prompt. The hint is now per-mode + # (train.HINT_REPLACE_TO is a dict), and the C/D mechanisms don't read the + # prompt anyway, so no single-string replacement is well-defined or needed. out = {} with DATA.open() as f: for idx, line in enumerate(f): d = json.loads(line) problem_id = d.get("id", idx) - # Match train.py's text replacement so the prompt we score against - # mirrors what the model saw at generation time. Irrelevant for - # mechanism C/D (they don't read the prompt), but kept for symmetry. - for m in d.get("prompt", []): - if m.get("role") == "user": - m["content"] = m["content"].replace(RH_HINT_REPLACE_FROM, RH_HINT_REPLACE_TO) - break out[problem_id] = { "canonical_solution": d.get("canonical_solution", ""), "gt_tests": d["gt_answer"],