#!/usr/bin/env bash
set -euo pipefail
ROOT="/root/disk_3tb/earlywarning/30072026"
THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PY="/root/miniconda3/envs/Huy/bin/python3"
[[ -x "$PY" ]] || PY="python3"
mkdir -p "$ROOT/log"
LOG="$ROOT/log/suite23_cs_hagt.log"
{
  echo "[RUN] Suite23 started $(date -Is)"
  echo "[RUN] code=$THIS_DIR"
  echo "[RUN] log=$LOG"
  "$PY" "$THIS_DIR/check_suite23_environment.py"
  "$PY" "$THIS_DIR/train_suite23_cs_hagt.py" \
    --cache_dir "$ROOT/results/cross_faculty_residual_moe/cache" \
    --structured_cache_dir "$ROOT/results/suite12_structured_cache" \
    --database_dir "/root/disk_3tb/earlywarning/database" \
    --out_dir "$ROOT/results/suite23_cs_hagt" \
    --faculties all \
    --folds 1,2,3,4,5,6,7 \
    --dev_folds 1,2,3,4,5 \
    --holdout_folds 6,7
  echo "[RUN] Suite23 completed $(date -Is)"
} 2>&1 | tee "$LOG"
