#!/usr/bin/env bash
# Best model so far (vlaai_ws, mat, base augmentation + electrode-cluster dropout) with a 10-s input window.
# Causal read-out unchanged (<= 0.75 s future): only the past context grows. Result: results/vlaai_ws__mat_aug_cluster_w10s.json
cd "$(dirname "$0")/.."
PY=../../.venv/bin/python
QLOG=logs/queue_w10.log
exp=vlaai_ws__mat_aug_cluster_w10s
[[ -f results/$exp.json ]] && { echo "already done"; exit 0; }
echo "$(date '+%F %T') START $exp" | tee -a "$QLOG"
if $PY run_experiment.py --decoder vlaai_ws --prep mat --tag _aug_cluster_w10s --aug-variant cluster --window-s 10 < /dev/null >> logs/$exp.stdout 2>&1; then
  rm -f results/$exp.FAILED
  echo "$(date '+%F %T') DONE  $exp: $(grep 'MEAN over' logs/$exp.log | tail -1 | cut -d' ' -f3-)" | tee -a "$QLOG"
else
  touch results/$exp.FAILED; echo "$(date '+%F %T') FAILED $exp" | tee -a "$QLOG"
fi
$PY summarize.py > /dev/null 2>&1 || true
