Skip to content

Commit da58870

Browse files
Accept reordered spectral checkpoints (#1414)
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
1 parent 364b075 commit da58870

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

benchmarks/datasets/mathematical-benchmarks-v1/rank-one-spectral-limit-certificate/tests/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ghcr.io/astral-sh/uv:0.8.4-python3.12-bookworm-slim@sha256:dc7e1d08f8ca979826ec0b68b31c783e0b35b568be6a078d4cbedf38c4cc085e
22
RUN python -m pip install --no-cache-dir attrs==26.1.0 jsonschema==4.26.0 jsonschema-specifications==2025.9.1 referencing==0.37.0 rpds-py==2026.6.3 typing-extensions==4.16.0
3-
LABEL jacobian.checksum="6fe02bcf29f843830c5807a65fa10a0e0c443f6c02268ddbc799f4ca7ef2958a"
3+
LABEL jacobian.checksum="aa70552653e820310b26be21021aee03f73fa6df10bceb2b9c482322aeabca0f"
44
# Exact rational verifier for a rank-one spectral limit certificate.
55
LABEL jacobian.task="jacobian/rank-one-spectral-limit-certificate"
66
COPY expected.json input.json test.sh verifier.py verifier_support.py public_contract.json /tests/

benchmarks/datasets/mathematical-benchmarks-v1/rank-one-spectral-limit-certificate/tests/verifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def certificate_valid(result: object) -> bool:
9797
if ns is None:
9898
return False
9999
return bool(
100-
ns == sorted(set(ns))
100+
len(ns) == len(set(ns))
101101
and result["rank_one_sign"] == "DIAGONAL_MINUS_LAMBDA_ONES"
102102
and result["root_formula"] == "4*n*(n+1)/((n-1)*(n+2))"
103103
and rat(result["limit"]) == 4

benchmarks/validation/mathematical_benchmarks_v1/test_rank_one_spectral_limit_certificate.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ def test_accepts_alternative_exact_checkpoints(tmp_path: Path) -> None:
4545
assert support._run_verifier(task, app, logs).reward == 1.0
4646

4747

48+
def test_accepts_reordered_distinct_checkpoints(tmp_path: Path) -> None:
49+
task, app, logs = _case(tmp_path)
50+
submission = json.loads((app / "submission.json").read_text())
51+
submission["result"]["checkpoints"].reverse()
52+
_rewrite(app, submission)
53+
assert support._run_verifier(task, app, logs).reward == 1.0
54+
55+
4856
def test_rejects_sampled_but_corrupt_root(tmp_path: Path) -> None:
4957
task, app, logs = _case(tmp_path)
5058
submission = json.loads((app / "submission.json").read_text())

0 commit comments

Comments
 (0)