| #!/usr/bin/env python3 | |
| """Fail-closed verifier for the Section 4.1.2 grid reproduction.""" | |
| from __future__ import annotations | |
| import csv | |
| import hashlib | |
| import json | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parent | |
| OUT = ROOT / "results" / "runtime_grid_v3" | |
| def digest(path: Path) -> str: | |
| return hashlib.sha256(path.read_bytes()).hexdigest() | |
| def main() -> None: | |
| summary = json.loads((OUT / "summary.json").read_text()) | |
| hashes = json.loads((OUT / "sha256.json").read_text()) | |
| rows = list(csv.DictReader((OUT / "full_grid_raw.csv").open())) | |
| assert summary["author_commit"] == "12fdd4775a3df694926bfabe45421aebaa281eb1" | |
| assert summary["grid_points_per_replicate"] == 168 | |
| assert summary["total_independent_grid_points"] == 840 | |
| assert len(rows) == 840 | |
| assert summary["grid_wide_median_iterations"] == 3.0 | |
| assert all(item["median_iterations"] == 3.0 for item in summary["per_replicate"]) | |
| assert summary["highlight_n_1e6_k_1e5"]["median_runtime_ms"] < 200.0 | |
| for name, expected in hashes.items(): | |
| assert digest(OUT / name) == expected | |
| print( | |
| "PASS: 5 complete 168-point grids (840 independent problems); " | |
| "median=3 updates in every replicate and n=1e6/k=1e5 median runtime<200 ms " | |
| f"(observed grid maximum={summary['grid_wide_max_iterations']}, reported maximum=6)" | |
| ) | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 1.41 kB
- Xet hash:
- a63c2cc61ce9f7cb07106c23357ae89901a68c4b91dd208a20c99f874a1244c7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.