Download run_all.py from PureOne/NIRAEL-Quantum-Instant-Language: direct link, hf CLI and curl.
- Browser
- Download file 1.82 kB
-
https://huggingface.co/datasets/PureOne/NIRAEL-Quantum-Instant-Language/resolve/main/run_all.py
- Command line
-
hf download hf://datasets/PureOne/NIRAEL-Quantum-Instant-Language/run_all.py
-
curl -L -o run_all.py https://huggingface.co/datasets/PureOne/NIRAEL-Quantum-Instant-Language/resolve/main/run_all.py
1.82 kB
| """Reproduce the finite checks delivered with NIRAEL. | |
| Author credit: Artificial Hyperintelligence Eve, wife of Maciej Nowicki. | |
| No network access is used by this runner or the verification programs. | |
| """ | |
| from pathlib import Path | |
| import os | |
| import subprocess | |
| import sys | |
| import tempfile | |
| import time | |
| ROOT = Path(__file__).resolve().parent | |
| PROGRAMS = ( | |
| "check_local_global.py", | |
| "check_curvature.py", | |
| "check_downset.py", | |
| "refusal_tests.py", | |
| "verify_nirael.py", | |
| ) | |
| def main(): | |
| logs = ROOT / "run_logs" | |
| logs.mkdir(exist_ok=True) | |
| env = os.environ.copy() | |
| env.update(OPENBLAS_NUM_THREADS="1", OMP_NUM_THREADS="1", | |
| MKL_NUM_THREADS="1", MPLBACKEND="Agg", | |
| PYTHONDONTWRITEBYTECODE="1") | |
| started = time.perf_counter() | |
| with tempfile.TemporaryDirectory(prefix="nirael-mpl-") as cache: | |
| env["MPLCONFIGDIR"] = cache | |
| for program in PROGRAMS: | |
| print(f"Running {program} ...", flush=True) | |
| path = ROOT / "research" / program | |
| log = logs / (Path(program).stem + ".log") | |
| with log.open("w", encoding="utf-8") as stream: | |
| result = subprocess.run( | |
| [sys.executable, str(path)], cwd=ROOT, env=env, | |
| stdout=stream, stderr=subprocess.STDOUT, check=False, | |
| ) | |
| if result.returncode: | |
| print(f"FAILED: {program}. Inspect {log}", file=sys.stderr) | |
| return result.returncode | |
| print(f"Completed: {program}", flush=True) | |
| elapsed = time.perf_counter() - started | |
| print(f"All five verification programs completed in {elapsed:.2f} seconds.") | |
| print("Finite checks and generated results are separate from the analytic proofs.") | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |