Datasets:
Formats:
json
Languages:
English
Size:
< 1K
ArXiv:
Tags:
mathematics
matroid-theory
hyperfields
lorentzian-polynomials
symbolic-mathematics
reproducibility
Download code/verify_all.py from PureOne/Ilyoxune-Sharp-Hyperfield-Aggregation: direct link, hf CLI and curl.
- Browser
- Download file 2.41 kB
-
https://huggingface.co/datasets/PureOne/Ilyoxune-Sharp-Hyperfield-Aggregation/resolve/main/code/verify_all.py
- Command line
-
hf download hf://datasets/PureOne/Ilyoxune-Sharp-Hyperfield-Aggregation/code/verify_all.py
-
curl -L -o verify_all.py https://huggingface.co/datasets/PureOne/Ilyoxune-Sharp-Hyperfield-Aggregation/resolve/main/code/verify_all.py
2.41 kB
| #!/usr/bin/env python3 | |
| """Run all research checks while preserving delivered dataset snapshots.""" | |
| from pathlib import Path | |
| import argparse | |
| import json | |
| import shutil | |
| import subprocess | |
| import sys | |
| import tempfile | |
| def run(output_dir: Path) -> dict: | |
| code_root = Path(__file__).resolve().parent | |
| snapshot_root = code_root.parent / 'results' | |
| pairs = [ | |
| ('verify_ilyoxune.py', 'verification_results.json'), | |
| ('verify_strengthened_aggregation.py', 'strengthened_verification_results.json'), | |
| ('verify_strong_parameter_bound.py', 'strong_parameter_bound_results.json'), | |
| ('verify_lorentzian_obstruction.py', 'lorentzian_obstruction_results.json'), | |
| ] | |
| output_dir.mkdir(parents=True, exist_ok=True) | |
| results = [] | |
| with tempfile.TemporaryDirectory(prefix='ilyoxune-check-scripts-') as directory: | |
| work = Path(directory) | |
| for script, filename in pairs: | |
| # Each delivered verifier is self-contained. Running a temporary | |
| # copy supports both fixed-output and CLI-configurable verifiers. | |
| shutil.copyfile(code_root / script, work / script) | |
| subprocess.run([sys.executable, str(work / script)], cwd=work, check=True) | |
| destination = output_dir / filename | |
| destination.write_bytes((work / filename).read_bytes()) | |
| fresh = json.loads(destination.read_text(encoding='utf-8')) | |
| delivered = json.loads((snapshot_root / filename).read_text(encoding='utf-8')) | |
| results.append({'script': script, 'status': 'passed', | |
| 'matches_delivered_snapshot': fresh == delivered}) | |
| summary = {'status': 'all verification scripts passed', 'results': results} | |
| (output_dir / 'VERIFICATION_RUN.json').write_text(json.dumps(summary, indent=2) + '\n') | |
| print(json.dumps(summary, indent=2)) | |
| return summary | |
| def main() -> int: | |
| parser = argparse.ArgumentParser(description=__doc__) | |
| parser.add_argument('--output-dir', type=Path, | |
| help='Keep fresh JSON results in this directory; default uses temporary files.') | |
| args = parser.parse_args() | |
| if args.output_dir is not None: | |
| run(args.output_dir.resolve()) | |
| else: | |
| with tempfile.TemporaryDirectory(prefix='ilyoxune-verification-') as directory: | |
| run(Path(directory)) | |
| return 0 | |
| if __name__ == '__main__': | |
| raise SystemExit(main()) | |