SPB Git

spb/wp26_uqo

Public
909 B · 29 lines python
1#!/usr/bin/env python32# Author: Simon-Pierre Boucher — simon-pierre.boucher@uqo.ca3"""Write (or --check) results/freeze.json: the protocol freeze (prompt, config, code and model-id hashes)."""4from __future__ import annotations56import argparse7import sys8from pathlib import Path910sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))1112from agentic_valuation.experiments.freeze import check_freeze, write_freeze  # noqa: E402131415def main(argv: list[str] | None = None) -> int:16    ap = argparse.ArgumentParser(description=__doc__)17    ap.add_argument("--check", action="store_true")18    a = ap.parse_args(argv)19    if a.check:20        diffs = check_freeze()21        print("freeze OK" if not diffs else "PROTOCOL DEVIATION:\n  " + "\n  ".join(diffs))22        return 1 if diffs else 023    print("freeze written:", write_freeze())24    return 0252627if __name__ == "__main__":28    sys.exit(main())29
Files · main
Menu

Theme