From fc8fe99504fe86a3636721031a7dc3d41a7909a6 Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Wed, 22 Jul 2026 12:36:26 -0500 Subject: protocol: freeze post-failure Oral-A v2 funnel --- experiments/oral_a_v2_calibration_screen.py | 56 +++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 experiments/oral_a_v2_calibration_screen.py (limited to 'experiments/oral_a_v2_calibration_screen.py') diff --git a/experiments/oral_a_v2_calibration_screen.py b/experiments/oral_a_v2_calibration_screen.py new file mode 100644 index 0000000..7666dd4 --- /dev/null +++ b/experiments/oral_a_v2_calibration_screen.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +"""Run a deterministic shard of the frozen Oral-A-v2 calibration screen.""" +import argparse +import os +import subprocess +import sys + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--device", default="cuda") + parser.add_argument("--shard_index", type=int, default=0) + parser.add_argument("--num_shards", type=int, default=1) + parser.add_argument("--dry_run", action="store_true") + args = parser.parse_args() + if not 0 <= args.shard_index < args.num_shards: + raise ValueError("invalid shard index") + + common = [ + sys.executable, "experiments/conv_run.py", + "--mode", "sdil", "--device", args.device, + "--depth", "20", "--width", "16", "--seed", "0", + "--loader_seed", "0", "--batch_size", "128", "--epochs", "0", + "--train_limit", "10000", "--val_examples", "5000", + "--split_seed", "2027", "--eval_split", "validation", + "--eval_every", "0", "--augment_train", "1", + "--lr", "0.03", "--output_lr", "0.1", + "--lr_schedule", "constant", "--warmup_epochs", "0", + "--momentum", "0.9", "--weight_decay", "1e-4", + "--normalization", "batchnorm", "--vectorizer_mode", "channel_gated", + "--a_scale", "0", "--a_warmup_steps", "400", + "--pert_sigma", "0.01", "--pert_directions", "1", + "--pert_every", "4", "--perturb_seed", "1000", + "--alignment_probe", "64", + ] + jobs = [] + for calibration in ("unit_targets", "channel_subspace"): + for rate in (0.01, 0.1, 1.0): + tag = f"{calibration}_etaA{rate}" + jobs.append((tag, common + [ + "--apical_calibration_mode", calibration, + "--eta_A", str(rate), + "--out", f"results/oral_a_v2_calibration/{tag}.json", + ])) + os.makedirs("results/oral_a_v2_calibration", exist_ok=True) + for index, (tag, command) in enumerate(jobs): + if index % args.num_shards != args.shard_index: + continue + print(tag, " ".join(command), flush=True) + if not args.dry_run: + subprocess.run(command, check=True) + + +if __name__ == "__main__": + main() + -- cgit v1.2.3