#!/usr/bin/env bash
# Best decoder (vlaai_ws, mat prep, 5-s window) + training augmentation (config dnn_augment). Result: results/vlaai_ws__mat_aug.json
cd "$(dirname "$0")/.."
PY=../../.venv/bin/python
QLOG=logs/queue_aug.log
exp=vlaai_ws__mat_aug
echo "$(date '+%F %T') START $exp" | tee -a "$QLOG"
if [[ -f results/$exp.json ]]; then echo "already done" | tee -a "$QLOG"; exit 0; fi
if $PY run_experiment.py --decoder vlaai_ws --prep mat --tag _aug --augment < /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
