From 11c658d3fb91a503258f6cc3f91b76add797143d Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Fri, 22 May 2026 15:57:47 +0200 Subject: [PATCH] feat(argo): plumb --instrument-id flag through alpha-perception script + template Adds new workflow parameter instrument-id (default empty string = no filter). Script forwards via --instrument-id CLI flag to alpha_train when non-empty. EXTRA_FLAGS template logic appends --instrument-id only when set. kubectl apply must run first (per feedback_argo_template_must_apply) so the cluster CRD reflects the new parameter before argo submit. --- infra/k8s/argo/alpha-perception-template.yaml | 5 +++++ scripts/argo-alpha-perception.sh | 3 +++ 2 files changed, 8 insertions(+) diff --git a/infra/k8s/argo/alpha-perception-template.yaml b/infra/k8s/argo/alpha-perception-template.yaml index 95ed8384b..c777ecdf5 100644 --- a/infra/k8s/argo/alpha-perception-template.yaml +++ b/infra/k8s/argo/alpha-perception-template.yaml @@ -66,6 +66,8 @@ spec: value: "1" - name: auto-horizon-weights value: "false" + - name: instrument-id + value: "" - name: early-stop-metric value: "mean_auc" - name: early-stop-patience @@ -445,6 +447,9 @@ spec: if [ "{{workflow.parameters.auto-horizon-weights}}" = "true" ]; then EXTRA_FLAGS="$EXTRA_FLAGS --auto-horizon-weights" fi + if [ -n "{{workflow.parameters.instrument-id}}" ]; then + EXTRA_FLAGS="$EXTRA_FLAGS --instrument-id {{workflow.parameters.instrument-id}}" + fi TRACE_FLAG="" if [ -n "{{workflow.parameters.kernel-step-trace-path}}" ]; then diff --git a/scripts/argo-alpha-perception.sh b/scripts/argo-alpha-perception.sh index cf7fc11c5..692704f4a 100755 --- a/scripts/argo-alpha-perception.sh +++ b/scripts/argo-alpha-perception.sh @@ -35,6 +35,7 @@ CV_FOLD=0 CV_N_FOLDS=1 CV_TRAIN_WINDOW=0 DECISION_STRIDE=1 +INSTRUMENT_ID="" WATCH=false usage() { @@ -80,6 +81,7 @@ while [[ $# -gt 0 ]]; do --cv-n-folds) CV_N_FOLDS="$2"; shift 2 ;; --cv-train-window) CV_TRAIN_WINDOW="$2"; shift 2 ;; --decision-stride) DECISION_STRIDE="$2"; shift 2 ;; + --instrument-id) INSTRUMENT_ID="$2"; shift 2 ;; --watch) WATCH=true; shift ;; -h|--help) usage; exit 0 ;; *) echo "Unknown option: $1"; usage; exit 1 ;; @@ -151,4 +153,5 @@ argo submit -n foxhunt --from=wftmpl/alpha-perception \ -p cv-n-folds="$CV_N_FOLDS" \ -p cv-train-window="$CV_TRAIN_WINDOW" \ -p decision-stride="$DECISION_STRIDE" \ + -p instrument-id="$INSTRUMENT_ID" \ $WATCH_FLAG