Buckets:
| #!/usr/bin/env python3 | |
| """Read-only live check of the locked official OpenReview claim sources.""" | |
| from __future__ import annotations | |
| import argparse | |
| import json | |
| import sys | |
| from pathlib import Path | |
| LANE_ROOT = Path(__file__).resolve().parents[1] | |
| sys.path.insert(0, str(LANE_ROOT / "src")) | |
| from loss_aware_dro_repro.official_claims import ( # noqa: E402 | |
| DEFAULT_LOCK_PATH, | |
| OfficialClaimsError, | |
| load_official_claims_lock, | |
| validate_live_claims, | |
| ) | |
| def main() -> int: | |
| parser = argparse.ArgumentParser( | |
| description="Validate live official claims without updating the immutable lock." | |
| ) | |
| parser.add_argument("--lock", type=Path, default=DEFAULT_LOCK_PATH) | |
| parser.add_argument("--timeout", type=float, default=30.0) | |
| args = parser.parse_args() | |
| if args.timeout <= 0: | |
| parser.error("--timeout must be positive") | |
| try: | |
| lock = load_official_claims_lock(args.lock) | |
| report = validate_live_claims(lock, timeout=args.timeout) | |
| except OfficialClaimsError as exc: | |
| print(f"OFFICIAL CLAIMS INVALID: {exc}", file=sys.stderr) | |
| return 2 | |
| print(json.dumps(report, sort_keys=True)) | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |
Xet Storage Details
- Size:
- 1.27 kB
- Xet hash:
- 22e6df611c310142569ded32bb4ab24ff1eabfb5c21e7dd896711d6706f9428a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.