fix(rl): per-fold OUT_DIR so multi-fold G8 submissions don't collide

Concurrent submissions at the same SHA (one workflow per fold_idx
for the walk-forward G8 gate) would overwrite each other's
eval_summary.json. Adds a /foldN suffix to the output path so the
aggregator can collect 3+ distinct eval_summary.json files from
/feature-cache/alpha-rl-runs/<sha>/fold0,fold1,fold2/.

Single-fold smokes (n_folds=1) still write to /<sha>/fold0/
directly — backwards-compatible for the prior smoke pattern, just
one level deeper than before.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-05-23 17:15:23 +02:00
parent 87a22d12c9
commit a3dc61a05a

View File

@@ -373,7 +373,11 @@ spec:
BIN="/data/bin/$SHA/alpha_rl_train"
MBP10_DIR="/data/futures-baseline-mbp10/ES.FUT"
PREDECODED_DIR="/feature-cache/predecoded"
OUT_DIR="/feature-cache/alpha-rl-runs/$SHA"
# Per-fold output dir so concurrent multi-fold G8 submissions
# don't clobber each other's eval_summary.json. Single-fold
# smokes (n_folds=1) still land under the SHA dir directly
# since fold_idx=0 → suffix "fold0".
OUT_DIR="/feature-cache/alpha-rl-runs/$SHA/fold{{workflow.parameters.fold-idx}}"
mkdir -p "$OUT_DIR" "$PREDECODED_DIR"
if [ ! -x "$BIN" ]; then