tools/battery: a set with a known-wrong reference can be left unscored

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013nW6FNRP1bBJJ8pfHiByAT
This commit is contained in:
2026-09-20 18:45:04 +02:00
co-authored by Claude Opus 5
parent 2f612d6aae
commit ffe649efae
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -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": "<why>"`: 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
+2
View File
@@ -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"]))