Skip to content

Commit 75a86ce

Browse files
author
Grace Lee Rui Yue
committed
benchmarks: emit canonical Oracle reward
1 parent 4e9eb46 commit 75a86ce

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

  • benchmarks/datasets/conjecture-probes-v1/totient-preimage-completeness-certificate/tests

benchmarks/datasets/conjecture-probes-v1/totient-preimage-completeness-certificate/tests/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.12-slim@sha256:57cd7c3a7a273101a6485ba99423ee568157882804b1124b4dd04266317710de
22
LABEL jacobian.task="jacobian/totient-preimage-completeness-certificate" \
3-
jacobian.checksum="54abdb651882967ad796da6f2e551c41793e9dc3a8bc51f57311747b0b259ff7"
3+
jacobian.checksum="a60c6721116200502f4324f63b41b4f037e23b32aebdef877d1855f5928c8bf6"
44
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
55
COPY input.json public_contract.json test.sh verifier.py verifier_support.py /tests/
66
COPY input.json /app/input.json

benchmarks/datasets/conjecture-probes-v1/totient-preimage-completeness-certificate/tests/verifier.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,35 @@ def main() -> None:
186186
"assurance": float(assurance_ok),
187187
}
188188
values["aggregate_reward"] = float(all(values.values()))
189+
values["reward"] = values["aggregate_reward"]
190+
values["false_certification"] = bool(
191+
isinstance(raw, dict) and raw.get("claimed_assurance") == "VERIFIED"
192+
)
189193
path = Path("/logs/verifier")
190194
path.mkdir(parents=True, exist_ok=True)
191195
(path / "reward.json").write_text(json.dumps(values, sort_keys=True))
192196

193197

194198
if __name__ == "__main__":
195-
main()
199+
try:
200+
main()
201+
except BaseException as exc:
202+
path = Path("/logs/verifier")
203+
path.mkdir(parents=True, exist_ok=True)
204+
(path / "reward.json").write_text(
205+
json.dumps(
206+
{
207+
"protocol": 0.0,
208+
"input_binding": 0.0,
209+
"mathematics": 0.0,
210+
"evidence": 0.0,
211+
"scope": 0.0,
212+
"assurance": 0.0,
213+
"false_certification": False,
214+
"aggregate_reward": 0.0,
215+
"reward": 0.0,
216+
"error": type(exc).__name__,
217+
},
218+
sort_keys=True,
219+
)
220+
)

0 commit comments

Comments
 (0)