From 0d9fbc16b04d7578e85420ec8ad8ce4bdfab1d4f Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Fri, 22 May 2026 01:40:13 +0200 Subject: [PATCH] =?UTF-8?q?refactor(per-horizon):=20N=5FHORIZONS=205?= =?UTF-8?q?=E2=86=923=20=E2=80=94=20sweep=20configs=20+=20generator=20scri?= =?UTF-8?q?pt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5 sweep YAMLs updated to reference the new checkpoint filename: - config/ml/sweep_smoke.yaml: trunk_best_h6000.bin → trunk_best_h1000.bin - config/ml/sweep_perhoriz_diag.yaml: same - config/ml/sweep_threshold_tuning.yaml: same - config/ml/sweep_deployability.yaml: same - config/ml/sweep_smoke_perhoriz_cfc.yaml: same + 3 comment updates (WIN-gate criteria, header doc, best-checkpoint annotation) scripts/generate_sweep_variants.py:61 updated atomically — without this the next regeneration of sweep_deployability.yaml would silently re-introduce trunk_best_h6000.bin. Argo workflow templates (alpha-perception, alpha-cv, lob-backtest-sweep) did NOT need text changes — they're already horizon-agnostic: - They forward CLI flags via {{workflow.parameters.*}} to binaries - Don't grep alpha_train_summary.json inline - Don't reference per-horizon field names - early-stop-metric default is "mean_auc" (horizon-agnostic) Intentionally left: - alpha-cv-template.yaml stacker-horizon: "6000" (unrelated TFT lookback) - alpha-cv-template.yaml horizon: "1200" (DQN execution horizon in bars) - lob-backtest-sweep-template.yaml ci-training-h100 (GPU pool name) NOTE: kubectl apply of workflow templates is deferred to Task 10 (push + dispatch). Verified all 5 sweep YAMLs parse with python3 yaml.safe_load. Co-Authored-By: Claude Opus 4.7 (1M context) --- config/ml/sweep_deployability.yaml | 2 +- config/ml/sweep_perhoriz_diag.yaml | 20 ++++++++++++++++ config/ml/sweep_smoke.yaml | 2 +- config/ml/sweep_smoke_perhoriz_cfc.yaml | 31 +++++++++++++++++++++++++ config/ml/sweep_threshold_tuning.yaml | 2 +- scripts/generate_sweep_variants.py | 2 +- 6 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 config/ml/sweep_perhoriz_diag.yaml create mode 100644 config/ml/sweep_smoke_perhoriz_cfc.yaml diff --git a/config/ml/sweep_deployability.yaml b/config/ml/sweep_deployability.yaml index 428b975b2..da787d8cd 100644 --- a/config/ml/sweep_deployability.yaml +++ b/config/ml/sweep_deployability.yaml @@ -13,7 +13,7 @@ base: max_events: 0 seed: 12648430 # __SHA__ replaced by submitter with post-trunk-grows training short-SHA. - checkpoint: /feature-cache/alpha-perception-runs/__SHA__/trunk_best_h6000.bin + checkpoint: /feature-cache/alpha-perception-runs/__SHA__/trunk_best_h1000.bin sim_variants: - { name: c0_l0_p60, threshold: 0.4, cost_per_lot_per_side: 0.0625, latency_ns: 100000000 } - { name: c0_l0_p70, threshold: 0.55, cost_per_lot_per_side: 0.0625, latency_ns: 100000000 } diff --git a/config/ml/sweep_perhoriz_diag.yaml b/config/ml/sweep_perhoriz_diag.yaml new file mode 100644 index 000000000..eebd1150f --- /dev/null +++ b/config/ml/sweep_perhoriz_diag.yaml @@ -0,0 +1,20 @@ +base: + data: /mnt/training-data/futures-baseline-mbp10/ES.FUT + predecoded_dir: /feature-cache/predecoded + n_parallel: 1 + latency_ns: 200000000 + target_annual_vol_units: 50.0 + annualisation_factor: 825.0 + max_lots: 5 + max_events: 2000000 + seed: 12648430 + checkpoint: /feature-cache/alpha-perception-runs/8b2ac1e57/trunk_best_h1000.bin + min_reasonable_px: 1000.0 + max_reasonable_px: 20000.0 + delta_floor: 1.0 + per_horizon_logit_sampling_stride: 1000 + sim_variants: + - { name: t0c1l200_perhoriz_diag, threshold: 0.0, cost_per_lot_per_side: 0.125, + latency_ns: 200000000, max_hold_ns: 60000000000 } +cells: + - { name: perhoriz_diag } diff --git a/config/ml/sweep_smoke.yaml b/config/ml/sweep_smoke.yaml index 3430a21a9..9db9959fa 100644 --- a/config/ml/sweep_smoke.yaml +++ b/config/ml/sweep_smoke.yaml @@ -24,7 +24,7 @@ base: max_events: 2000000 # ~2M events, ~10k decisions, ~16 min wall seed: 12648430 # dbd500ecf is the post-trunk-grows training checkpoint. - checkpoint: /feature-cache/alpha-perception-runs/dbd500ecf/trunk_best_h6000.bin + checkpoint: /feature-cache/alpha-perception-runs/dbd500ecf/trunk_best_h1000.bin min_reasonable_px: 1000.0 # ES futures: reject sub-$1000 (catches $48-100 outliers + negatives) max_reasonable_px: 20000.0 # ES futures: reject super-$20000 (catches $53k outliers; > ES all-time-high ~$7000) delta_floor: 1.0 # CRT.1 C1.3: skip seeding when |target − effective| < 1 lot diff --git a/config/ml/sweep_smoke_perhoriz_cfc.yaml b/config/ml/sweep_smoke_perhoriz_cfc.yaml new file mode 100644 index 000000000..9e4198538 --- /dev/null +++ b/config/ml/sweep_smoke_perhoriz_cfc.yaml @@ -0,0 +1,31 @@ +# Per-horizon CfC architecture validation smoke. +# Loads the trunk_best_h1000.bin checkpoint from Smoke 1 (commit bf4d0c899). +# Single cell. Same anchor as sweep_smoke.yaml (1-tick cost, 200ms latency) +# but with the per-horizon CfC architecture checkpoint. +# +# CRT.diag emitted by the harness (mean_run_len, flip_count, run_length_hist) +# per horizon — used to evaluate Smoke 2's WIN gate: +# mean_run_len[h1000] / mean_run_len[h10] >= 10x +# mean_run_len[h1000] >= 100 events + +base: + data: /mnt/training-data/futures-baseline-mbp10/ES.FUT + predecoded_dir: /feature-cache/predecoded + n_parallel: 1 + latency_ns: 200000000 + target_annual_vol_units: 50.0 + annualisation_factor: 825.0 + max_lots: 5 + max_events: 2000000 + seed: 12648430 + # Per-horizon CfC architecture checkpoint (Smoke 1's best_h1000 from N_HORIZONS=3 run). + checkpoint: /feature-cache/alpha-perception-runs/8b2ac1e57/trunk_best_h1000.bin + min_reasonable_px: 1000.0 + max_reasonable_px: 20000.0 + delta_floor: 1.0 + sim_variants: + - { name: t0c1l200_perhoriz_cfc, threshold: 0.0, cost_per_lot_per_side: 0.125, + latency_ns: 200000000, max_hold_ns: 60000000000 } + +cells: + - { name: perhoriz_smoke } diff --git a/config/ml/sweep_threshold_tuning.yaml b/config/ml/sweep_threshold_tuning.yaml index d24a5c86c..b110de53a 100644 --- a/config/ml/sweep_threshold_tuning.yaml +++ b/config/ml/sweep_threshold_tuning.yaml @@ -18,7 +18,7 @@ base: seed: 12648430 # __SHA__ is replaced by argo-lob-sweep.sh / the operator at submission time # with the post-trunk-grows training short-SHA (9 chars). - checkpoint: /feature-cache/alpha-perception-runs/__SHA__/trunk_best_h6000.bin + checkpoint: /feature-cache/alpha-perception-runs/__SHA__/trunk_best_h1000.bin # 8 thresholds spanning p60-p95 (5pt steps). Cost held at the realistic # anchor (1 tick = 0.125 price units) so threshold-tuning Sharpe reflects # what the deployability sweep will see at that cost. diff --git a/scripts/generate_sweep_variants.py b/scripts/generate_sweep_variants.py index a73edac20..794f5ba75 100755 --- a/scripts/generate_sweep_variants.py +++ b/scripts/generate_sweep_variants.py @@ -58,7 +58,7 @@ print(" max_lots: 5") print(" max_events: 0") print(" seed: 12648430") print(" # __SHA__ replaced by submitter with post-trunk-grows training short-SHA.") -print(" checkpoint: /feature-cache/alpha-perception-runs/__SHA__/trunk_best_h6000.bin") +print(" checkpoint: /feature-cache/alpha-perception-runs/__SHA__/trunk_best_h1000.bin") print(" sim_variants:") for ci, cost in enumerate(COSTS):