From ffe649efaeb8626e38e59fa35d7a258737f3de46 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sat, 19 Sep 2026 17:21:46 +0200 Subject: [PATCH] tools/battery: a set with a known-wrong reference can be left unscored Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_013nW6FNRP1bBJJ8pfHiByAT --- tools/battery/README.md | 2 ++ tools/battery/score.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/battery/README.md b/tools/battery/README.md index 982e7d7e5..65d6c2005 100644 --- a/tools/battery/README.md +++ b/tools/battery/README.md @@ -341,6 +341,8 @@ whole range; the manifest keeps the rule used as `dmin_rule`. control), then run `battery.py refs --arm inhouse --write` to fill in `ref` from the `CORRECT.LP` beside the input. Without `--write`, `refs` only shows what would change. A reference measured by hand goes in `ref_override`, which `refs` leaves alone. + A set whose reference is known to be wrong gets `"unscored": ""`: it still runs, but + scores `unscored` instead of pass or fail. - **Renamed data directories**: `battery.py remap --arm inhouse MAP.json --write`, where `MAP.json` is `{"old": "new"}` (renames the set and its directory) or `{"old id": {"id": "...", "input": "..."}}`. Each old id is recorded under `aliases` in the diff --git a/tools/battery/score.py b/tools/battery/score.py index 81cae0ff1..331722d7d 100644 --- a/tools/battery/score.py +++ b/tools/battery/score.py @@ -159,6 +159,8 @@ def judge(entry, rep, run_note): return verdict("fail", "crash", run_note or "no lattice in the report") if not ref.get("sgno") or not ref.get("cell"): return verdict("unscored", "no_reference", "no reference to score against") + if entry.get("unscored"): # a reference known to be wrong: run, but do not score + return verdict("unscored", "reference_problem", entry["unscored"]) vr, edge = lattice_match(r["cell"], space_group(rep.get("SPACE_GROUP_NAME"), r["sgno"]), ref["cell"], space_group(ref.get("sg"), ref["sgno"]))