Commit
N1 tail chains (recalibration merge/re-scoring, economics, loadings, validation re-score; P10/P3/P4 contrasts, pass 2, final P1 pass; P11 archive)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
added
scripts/review/batch_N1d.sh
+23 −0
@@ -0,0 +1,23 @@ | ||
| 1 | +#!/bin/bash | |
| 2 | +# N1d = M3U96b, after N1a and the N9 gather (corrected baselines + c_val_parametric): merge the recalibration | |
| 3 | +# constants, neural re-scoring with c on 2024/2025 (MPS), recalibrated leaderboards and pairwise contrasts, P6 economics | |
| 4 | +# on every model with the delay (four tags), P7 copula-head loadings, P2 checkpoint re-scoring on both validation subsets. | |
| 5 | +set -e; cd ~/wp41_uqo | |
| 6 | +export OMP_NUM_THREADS=4 PYTORCH_ENABLE_MPS_FALLBACK=1; ulimit -n 65536 | |
| 7 | +PY="nice -n 10 .venv/bin/python" | |
| 8 | +test -f results/metrics/recal/c_val_parametric.json -a -f results/metrics/recal/c_val_neural.json || { echo "[N1d] c_val parts missing"; exit 2; } | |
| 9 | +bash scripts/review/ledger.sh P5_recal_merge "$PY scripts/recalibrate.py --part merge" | |
| 10 | +bash scripts/review/ledger.sh P5_rescore_neural_pooled "$PY scripts/review/rescore_scaled.py --part neural --tags test,final" | |
| 11 | +bash scripts/review/ledger.sh P5_rescore_leaderboard "$PY scripts/review/rescore_scaled.py --part leaderboard" | |
| 12 | +RP="mrpt_small_recal:har_rv_recal,mrpt_small_recal:ridge_recal,mrpt_small_recal:elastic_net_recal,mrpt_small_recal:lightgbm_recal,mrpt_small_recal:naive_rw_t,mrpt_small:naive_rw_t,mrpt_small_recal:mrpt_small,mrpt_small:har_rv_recal,mrpt_small:lightgbm_recal,mrpt_small_recal:mrpt_small_1m_only_recal,har_rv_recal:naive_rw_t,mrpt_base_recal:mrpt_small_recal" | |
| 13 | +bash scripts/review/ledger.sh P5_pairwise_test_recal "$PY scripts/pairwise.py --exp main --tag test --out-suffix _recal --pairs $RP --no-stress" | |
| 14 | +bash scripts/review/ledger.sh P5_pairwise_final_recal "$PY scripts/pairwise.py --exp final --tag final --out-suffix _recal --pairs $RP --no-stress" | |
| 15 | +for exp_tag in "main test" "main test_heldout" "final final" "final final_heldout"; do | |
| 16 | + set -- $exp_tag | |
| 17 | + bash scripts/review/ledger.sh "P6_economic_$2" "$PY scripts/economic.py --exp $1 --tag $2 --models all --delay 1" | |
| 18 | +done | |
| 19 | +bash scripts/review/ledger.sh P7_loadings "$PY scripts/copula_diagnostics.py --part loadings --exp ablations" | |
| 20 | +bash scripts/review/ledger.sh P2_rescore_validation "$PY scripts/rescore_validation.py" | |
| 21 | +bash scripts/review/ledger.sh P5_rescore_neural_heldout "$PY scripts/review/rescore_scaled.py --part neural --tags test_heldout,final_heldout" | |
| 22 | +bash scripts/review/ledger.sh P5_rescore_leaderboard2 "$PY scripts/review/rescore_scaled.py --part leaderboard" | |
| 23 | +echo "[N1d] done" | |
added
scripts/review/batch_N1e.sh
+43 −0
@@ -0,0 +1,43 @@ | ||
| 1 | +#!/bin/bash | |
| 2 | +# N1e = M3U96b, after the gathers of N2/N6 (budget, ablations_h3), N3/N4/N5 (seeds) and N8: P10 contrasts, learning | |
| 3 | +# curve, seed contrast, ablations pass 2 (retrained copula), final P1 pass on main/final with the corrected baselines, | |
| 4 | +# mde and convention check, P9 transfer contrasts. | |
| 5 | +set -e; cd ~/wp41_uqo | |
| 6 | +export OMP_NUM_THREADS=4; ulimit -n 65536 | |
| 7 | +PY="nice -n 10 .venv/bin/python" | |
| 8 | +# P10 | |
| 9 | +mkdir -p results/metrics/ablations_h3 | |
| 10 | +[ -f results/metrics/ablations_h3/origins_test.csv ] || cp results/metrics/ablations/origins_test.csv results/metrics/ablations_h3/ | |
| 11 | +for f in per_origin_mrpt_small_b4k_test.npz; do ln -sf ../ablations/$f results/metrics/ablations_h3/$f; done | |
| 12 | +ln -sf ../main/per_origin_naive_rw_t_test.npz results/metrics/ablations_h3/per_origin_naive_rw_t_test.npz | |
| 13 | +ln -sf ../main/per_origin_naive_rw_test.npz results/metrics/ablations_h3/per_origin_naive_rw_test.npz | |
| 14 | +H3P="mrpt_small_redglob_stats:mrpt_small_redglob_none,mrpt_small_redglob_none:mrpt_small_b4k,mrpt_small_redglob_stats:mrpt_small_b4k,mrpt_small_time_only_redglob:naive_rw_t,mrpt_small_time_only_redglob:mrpt_small_b4k,mrpt_small_shuffled_pv:mrpt_small_b4k,mrpt_small_time_only_redglob:naive_rw,mrpt_small_b4k:naive_rw_t" | |
| 15 | +bash scripts/review/ledger.sh P10_pairwise "$PY scripts/pairwise.py --exp ablations_h3 --tag test --pairs $H3P --mcs" | |
| 16 | +bash scripts/review/ledger.sh P10_tables "$PY scripts/run_experiment.py --config configs/ablations_h3.yaml --stage tables --eval-split test" | |
| 17 | +# P4 | |
| 18 | +bash scripts/review/ledger.sh P4_learning_curve "$PY scripts/review/learning_curve.py" | |
| 19 | +# P3 | |
| 20 | +ln -sf ../main/per_origin_har_rv_test.npz results/metrics/seeds/per_origin_har_rv_test.npz | |
| 21 | +md5 -q results/metrics/seeds/origins_test.csv results/metrics/main/origins_test.csv | |
| 22 | +bash scripts/review/ledger.sh P3_seed_contrast "$PY scripts/seed_contrast.py --tag test" | |
| 23 | +SP="mrpt_small_s2:har_rv,mrpt_small_s3:har_rv,mrpt_small_s4:har_rv,mrpt_small_s5:har_rv,mrpt_small_1m_only_s2:har_rv,mrpt_small_1m_only_s3:har_rv,mrpt_small_1m_only_s4:har_rv,mrpt_small_1m_only_s5:har_rv,mrpt_small_s2:mrpt_small_1m_only_s2,mrpt_small_s3:mrpt_small_1m_only_s3,mrpt_small_s4:mrpt_small_1m_only_s4,mrpt_small_s5:mrpt_small_1m_only_s5" | |
| 24 | +bash scripts/review/ledger.sh P3_pairwise_seeds "$PY scripts/pairwise.py --exp seeds --tag test --pairs $SP --no-stress" | |
| 25 | +bash scripts/review/ledger.sh P3_tables_seeds "$PY scripts/run_experiment.py --config configs/seeds12k.yaml --stage tables --eval-split test" | |
| 26 | +bash scripts/review/ledger.sh P4_tables_budget "$PY scripts/run_experiment.py --config configs/budget.yaml --stage tables --eval-split test" | |
| 27 | +# ablations pass 2 (retrained copula head) | |
| 28 | +PASS=2 bash scripts/review/batch_N8.sh | |
| 29 | +# final P1 pass with the corrected baselines (+ transfer300 and naive_rw_t pairs) | |
| 30 | +MAIN_PAIRS="mrpt_small:mrpt_small_1m_only,mrpt_base:mrpt_small,mrpt_small:har_rv,mrpt_small:garch_t,mrpt_small:ewma,mrpt_small:lightgbm,mrpt_small:tcn,mrpt_small:mlp,har_rv:garch_t,mrpt_small:ridge,mrpt_small:elastic_net,mrpt_small:seasonal_vol,mrpt_small:naive_rw,har_rv:naive_rw,mrpt_small:naive_rw_t" | |
| 31 | +for exp_tag in "main test" "main test_heldout" "final final" "final final_heldout"; do | |
| 32 | + set -- $exp_tag; exp=$1; tag=$2 | |
| 33 | + extra=""; pairs=$MAIN_PAIRS | |
| 34 | + case $tag in *_heldout) extra="--transfer-gap"; pairs="$MAIN_PAIRS,mrpt_small_all300:mrpt_small,mrpt_small_all300:har_rv,mrpt_small_all300:naive_rw";; esac | |
| 35 | + sub=""; case $tag in test|final) sub="--subgroups mrpt_small:har_rv";; esac | |
| 36 | + bash scripts/review/ledger.sh "P1_pairwise_${exp}_${tag}_final" "$PY scripts/pairwise.py --exp $exp --tag $tag --pairs $pairs --mcs $extra $sub" | |
| 37 | + cfg=configs/main.yaml; [ $exp = final ] && cfg=configs/final.yaml | |
| 38 | + split=${tag%_heldout}; ho=""; case $tag in *_heldout) ho="--heldout";; esac | |
| 39 | + bash scripts/review/ledger.sh "P1_tables_${exp}_${tag}_final" "$PY scripts/run_experiment.py --config $cfg --stage tables --eval-split $split $ho" | |
| 40 | +done | |
| 41 | +bash scripts/review/ledger.sh P1_mde_final "$PY scripts/review/mde.py" | |
| 42 | +bash scripts/review/ledger.sh P1_convention_final "$PY scripts/review/convention_check.py" | |
| 43 | +echo "[N1e] done" | |
added
scripts/review/batch_N1f.sh
+18 −0
@@ -0,0 +1,18 @@ | ||
| 1 | +#!/bin/bash | |
| 2 | +# N1f = M3U96b, last: P11 environment, QA flags, provenance copy, archive (+ reproduction check from the archive). | |
| 3 | +set -e; cd ~/wp41_uqo | |
| 4 | +export OMP_NUM_THREADS=4; ulimit -n 65536 | |
| 5 | +PY="nice -n 10 .venv/bin/python" | |
| 6 | +mkdir -p results/metrics/provenance && cp results/logs/provenance_*.jsonl results/metrics/provenance/ | |
| 7 | +bash scripts/review/ledger.sh P11_qa_flags "$PY scripts/review/qa_flags.py" | |
| 8 | +bash scripts/review/ledger.sh P11_environment "$PY scripts/review/environment.py" | |
| 9 | +bash scripts/review/ledger.sh P11_archive "$PY scripts/review/make_archive.py --tar" | |
| 10 | +bash scripts/review/ledger.sh P11_archive_check "$PY scripts/pairwise.py --exp main --tag test --root ~/wp41-archive --out-dir /tmp/wp41_archive_check --pairs mrpt_small:mrpt_small_1m_only,mrpt_small:har_rv,mrpt_small:naive_rw --no-stress && $PY - <<'PY' | |
| 11 | +import pandas as pd, numpy as np | |
| 12 | +a = pd.read_csv('results/metrics/main/pairwise_test.csv'); b = pd.read_csv('/tmp/wp41_archive_check/pairwise_test.csv') | |
| 13 | +m = a.merge(b, on=['model','reference','metric','H'], suffixes=('', '_arch')) | |
| 14 | +cols = ['diff','t_cl','dm_t','t_daily'] | |
| 15 | +print({c: float((m[c]-m[c+'_arch']).abs().max()) for c in cols}, 'rows', len(m)) | |
| 16 | +assert all((m[c]-m[c+'_arch']).abs().max() < 1e-10 for c in cols) | |
| 17 | +PY" | |
| 18 | +echo "[N1f] done" | |
| 19 | ||