Download verify_manifest.py from SabaPivot/repro-differentiable-conformal-training-for-llm-reasoning-factuality: direct link, hf CLI and curl.
- Browser
- Download file 519 Bytes
-
https://huggingface.co/spaces/SabaPivot/repro-differentiable-conformal-training-for-llm-reasoning-factuality/resolve/main/verify_manifest.py
- Command line
-
hf download hf://spaces/SabaPivot/repro-differentiable-conformal-training-for-llm-reasoning-factuality/verify_manifest.py
-
curl -L -o verify_manifest.py https://huggingface.co/spaces/SabaPivot/repro-differentiable-conformal-training-for-llm-reasoning-factuality/resolve/main/verify_manifest.py
519 Bytes
| #!/usr/bin/env python3 | |
| import hashlib | |
| from pathlib import Path | |
| r=Path(__file__).resolve().parent;rows=(r/'BUNDLE_SHA256SUMS.txt').read_text().splitlines();seen=set() | |
| for row in rows: | |
| h,n=row.split(' ',1);p=r/n;assert p.is_file() and hashlib.sha256(p.read_bytes()).hexdigest()==h,n;seen.add(n) | |
| actual={p.relative_to(r).as_posix() for p in r.rglob('*') if p.is_file() and p.name!='BUNDLE_SHA256SUMS.txt' and '__pycache__' not in p.parts};assert seen==actual,(seen^actual);print(f'manifest verified: {len(rows)} files') | |