fix: single-pass 14D hyperopt in Argo workflow — remove redundant phases

With family-based 14D search space, Phase Fast already searches all dims.
Phases 2-4 (Full/Reward/Risk) were designed for the old 30D space where
each phase explored different parameter subsets. Now redundant — saves
3× hyperopt compute per training run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-31 09:54:25 +02:00
parent df55c60945
commit 92d59ef529

View File

@@ -406,7 +406,9 @@ spec:
echo "=== Running hyperopt: $MODEL (${BINARY}) ==="
echo " Trials: {{workflow.parameters.hyperopt-trials}}, Epochs: {{workflow.parameters.hyperopt-epochs}}"
# Phase 1 (fast): fix architecture, search learning dynamics
# Single-pass 14D hyperopt: family-based search covers all dims at once.
# Fast phase searches all 14 dimensions (3 breakouts + 11 family intensities).
# Phased search was needed for the old 30D space; 14D is within PSO's efficient range.
${BINARY} \
--model "$MODEL" \
--phase fast \
@@ -421,59 +423,9 @@ spec:
--mbp10-data-dir {{workflow.parameters.mbp10-data-dir}} \
--trades-data-dir {{workflow.parameters.trades-data-dir}} \
--base-dir /workspace/output/hyperopt \
--output /workspace/output/${MODEL}_phase1_results.json
echo "=== Phase 1 complete ==="
cat /workspace/output/${MODEL}_phase1_results.json 2>/dev/null || echo "No Phase 1 results"
# Phase 2 (full): fix dynamics from Phase 1, search architecture
PHASE2_TRIALS=$(({{workflow.parameters.hyperopt-trials}} / 2))
[ "$PHASE2_TRIALS" -lt 5 ] && PHASE2_TRIALS=5
PHASE2_EPOCHS=$(({{workflow.parameters.hyperopt-epochs}} * 2))
${BINARY} \
--model "$MODEL" \
--phase full \
--hyperopt-params /workspace/output/${MODEL}_phase1_results.json \
--trials $PHASE2_TRIALS \
--epochs $PHASE2_EPOCHS \
--symbol {{workflow.parameters.symbol}} \
--tx-cost-bps {{workflow.parameters.tx-cost-bps}} \
--tick-size {{workflow.parameters.tick-size}} \
--spread-ticks {{workflow.parameters.spread-ticks}} \
--initial-capital {{workflow.parameters.initial-capital}} \
--data-dir {{workflow.parameters.data-dir}} \
--mbp10-data-dir {{workflow.parameters.mbp10-data-dir}} \
--trades-data-dir {{workflow.parameters.trades-data-dir}} \
--base-dir /workspace/output/hyperopt \
--output /workspace/output/${MODEL}_phase2_results.json
echo "=== Phase 2 complete ==="
cat /workspace/output/${MODEL}_phase2_results.json 2>/dev/null || echo "No Phase 2 results"
# Phase 3 (reward): fix dynamics + architecture, search only reward weights (7D)
PHASE3_TRIALS=$(({{workflow.parameters.hyperopt-trials}} / 2))
[ "$PHASE3_TRIALS" -lt 5 ] && PHASE3_TRIALS=5
PHASE3_EPOCHS=$(({{workflow.parameters.hyperopt-epochs}} * 2))
${BINARY} \
--model "$MODEL" \
--phase reward \
--hyperopt-params /workspace/output/${MODEL}_phase2_results.json \
--trials $PHASE3_TRIALS \
--epochs $PHASE3_EPOCHS \
--symbol {{workflow.parameters.symbol}} \
--tx-cost-bps {{workflow.parameters.tx-cost-bps}} \
--tick-size {{workflow.parameters.tick-size}} \
--spread-ticks {{workflow.parameters.spread-ticks}} \
--initial-capital {{workflow.parameters.initial-capital}} \
--data-dir {{workflow.parameters.data-dir}} \
--mbp10-data-dir {{workflow.parameters.mbp10-data-dir}} \
--trades-data-dir {{workflow.parameters.trades-data-dir}} \
--base-dir /workspace/output/hyperopt \
--output /workspace/output/${MODEL}_hyperopt_results.json
echo "=== Three-phase hyperopt complete ==="
echo "=== Hyperopt complete (14D single-pass) ==="
cat /workspace/output/${MODEL}_hyperopt_results.json 2>/dev/null || echo "No results file"
resources:
requests: