File size: 892 Bytes
42c0d23 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/usr/bin/env bash
# Sequential M1 driver for the 4 newly-trained 2026-05-08 runs.
set -e
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
LOG="logs/m1_seq_new.log"
mkdir -p logs
stamp() { date -u +"[%FT%TZ]"; }
echo "$(stamp) M1 sequential pipeline starting" | tee -a "$LOG"
for d in experiments/runs/20260508-*/; do
rid=$(basename "$d")
if [ -f "$d/mechinterp/m1_probe_data.json" ]; then
echo "$(stamp) skip $rid (already has m1_probe_data)" | tee -a "$LOG"
continue
fi
echo "$(stamp) ==== M1 on $rid ====" | tee -a "$LOG"
set +e
CUDA_VISIBLE_DEVICES=0 python3 -m experiments.mechinterp_m1 \
--run_dir "$d" --data_root data/wilds \
--device cuda --max_samples 600 >> "$LOG" 2>&1
rc=$?
set -e
echo "$(stamp) ==== $rid exit=$rc ====" | tee -a "$LOG"
done
echo "$(stamp) M1 sequential pipeline complete." | tee -a "$LOG"
|