From 8b28522305612d6300f485e14046ae38d49af426 Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Wed, 22 Jul 2026 17:02:45 -0500 Subject: protocol: freeze dynamic projection training gate --- experiments/kp_dynamic_projection_development.py | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 experiments/kp_dynamic_projection_development.py (limited to 'experiments/kp_dynamic_projection_development.py') diff --git a/experiments/kp_dynamic_projection_development.py b/experiments/kp_dynamic_projection_development.py new file mode 100755 index 0000000..1a6be90 --- /dev/null +++ b/experiments/kp_dynamic_projection_development.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python3 +"""Run the sole frozen D1 dynamic neutral-projection candidate.""" +import argparse +import json +import os +import subprocess +import sys + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--device", default="cuda") + parser.add_argument("--dry_run", action="store_true") + parser.add_argument( + "--s0_gate", default="results/kp_innovation_stability_gate.json") + parser.add_argument( + "--out", default="results/kp_dynamic_projection/dynamic.json") + args = parser.parse_args() + with open(args.s0_gate) as handle: + gate = json.load(handle) + if (gate.get("protocol") != "kp_stability_margin_training_prefix_v1" + or gate.get("status") != "failed_no_eligible_margin"): + raise ValueError("D1 requires the audited failed S0 gate") + command = [ + sys.executable, + "experiments/diagnose_kp_traffic_nonfinite.py", + "--rule", "innovation", + "--predictor_mode", "closed_form", + "--predictor_every", "0", + "--stability_margin", "0", + "--neutral_projection", + "--device", args.device, + "--max_steps", "352", + "--out", args.out, + ] + print(" ".join(command), flush=True) + if not args.dry_run: + os.makedirs(os.path.dirname(os.path.abspath(args.out)), exist_ok=True) + subprocess.run(command, check=True) + + +if __name__ == "__main__": + main() + -- cgit v1.2.3