infra(argo): plumb --batch-size + --auto-horizon-weights through template

Adds two new workflow parameters with backward-compatible defaults
(batch-size=1, auto-horizon-weights=false) so existing submissions
behave identically. Both flags are forwarded to alpha_train CLI.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-05-17 10:44:24 +02:00
parent c3ee5e165a
commit affb0e24cf
2 changed files with 18 additions and 1 deletions

View File

@@ -62,6 +62,10 @@ spec:
value: "1000"
- name: seed
value: "16962"
- name: batch-size
value: "1"
- name: auto-horizon-weights
value: "false"
volumes:
- name: git-ssh-key
@@ -409,6 +413,11 @@ spec:
echo " predecoded: $PREDECODED_DIR"
echo " out: $OUT_DIR"
EXTRA_FLAGS=""
if [ "{{workflow.parameters.auto-horizon-weights}}" = "true" ]; then
EXTRA_FLAGS="$EXTRA_FLAGS --auto-horizon-weights"
fi
"$BIN" \
--mbp10-data-dir "$MBP10_DIR" \
--predecoded-dir "$PREDECODED_DIR" \
@@ -420,7 +429,9 @@ spec:
--lr-mamba2 {{workflow.parameters.lr-mamba2}} \
--n-train-seqs {{workflow.parameters.n-train-seqs}} \
--n-val-seqs {{workflow.parameters.n-val-seqs}} \
--seed {{workflow.parameters.seed}}
--seed {{workflow.parameters.seed}} \
--batch-size {{workflow.parameters.batch-size}} \
$EXTRA_FLAGS
echo "=== Training complete ==="
ls -lh "$OUT_DIR/"

View File

@@ -27,6 +27,8 @@ LR_MAMBA2=1e-3
N_TRAIN_SEQS=8000
N_VAL_SEQS=1000
SEED=16962
BATCH_SIZE=1
AUTO_HORIZON_WEIGHTS=false
WATCH=false
usage() {
@@ -60,6 +62,8 @@ while [[ $# -gt 0 ]]; do
--n-train-seqs) N_TRAIN_SEQS="$2"; shift 2 ;;
--n-val-seqs) N_VAL_SEQS="$2"; shift 2 ;;
--seed) SEED="$2"; shift 2 ;;
--batch-size) BATCH_SIZE="$2"; shift 2 ;;
--auto-horizon-weights) AUTO_HORIZON_WEIGHTS=true; shift ;;
--watch) WATCH=true; shift ;;
-h|--help) usage; exit 0 ;;
*) echo "Unknown option: $1"; usage; exit 1 ;;
@@ -123,4 +127,6 @@ argo submit -n foxhunt --from=wftmpl/alpha-perception \
-p n-train-seqs="$N_TRAIN_SEQS" \
-p n-val-seqs="$N_VAL_SEQS" \
-p seed="$SEED" \
-p batch-size="$BATCH_SIZE" \
-p auto-horizon-weights="$AUTO_HORIZON_WEIGHTS" \
$WATCH_FLAG