Download tools/verify.py from JIAlonglong/Anchored-Path-Matching: direct link, hf CLI and curl.
- Browser
- Download file 686 Bytes
-
https://huggingface.co/JIAlonglong/Anchored-Path-Matching/resolve/main/tools/verify.py
- Command line
-
hf download hf://JIAlonglong/Anchored-Path-Matching/tools/verify.py
-
curl -L -o verify.py https://huggingface.co/JIAlonglong/Anchored-Path-Matching/resolve/main/tools/verify.py
686 Bytes
| #!/usr/bin/env python3 | |
| """Verify a materialized APM artifact against an immutable expected state.""" | |
| import argparse | |
| from pathlib import Path | |
| from anchorstep.weights.verify import verify_logical_state | |
| def main() -> int: | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--base", type=Path, required=True) | |
| parser.add_argument("--artifact", type=Path, required=True) | |
| parser.add_argument("--expected", type=Path, required=True) | |
| args = parser.parse_args() | |
| report = verify_logical_state(args.base, args.artifact, args.expected) | |
| print(report.materialized_digest) | |
| return 0 if report.ok else 1 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |