File size: 1,022 Bytes
33569f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Serial driver for v10_r2 ablations.
#   AB1: w/o Hungarian   (~7h)
#   AB2: w/o ST-Aug      (~7h)
# Halts on first failure (does NOT continue to next run).

set -e
set -u
set -o pipefail

cd "$(dirname "$0")/.."

mkdir -p logs

TS=$(date +%Y%m%d_%H%M%S)
SUMMARY="logs/ablations_summary_${TS}.log"

run_one() {
    local id="$1"; local script="$2"
    local log="logs/${id}_${TS}.log"
    echo "[$(date '+%F %T')] >>> START ${id}  (log: ${log})" | tee -a "$SUMMARY"
    bash "$script" 2>&1 | tee "$log"
    local rc=${PIPESTATUS[0]}
    if [ "$rc" -ne 0 ]; then
        echo "[$(date '+%F %T')] !!! FAIL  ${id}  (exit=${rc}) -- halting queue" | tee -a "$SUMMARY"
        exit "$rc"
    fi
    echo "[$(date '+%F %T')] <<< DONE   ${id}" | tee -a "$SUMMARY"
}

echo "=== ablation queue start ${TS} ===" | tee -a "$SUMMARY"
run_one ab_noHung scripts/run_grpo_forensics_ab_noHung.sh
run_one ab_noAug  scripts/run_grpo_forensics_ab_noAug.sh
echo "=== ablation queue done  $(date '+%F %T') ===" | tee -a "$SUMMARY"