summaryrefslogtreecommitdiff
path: root/diag/run_seeds.sh
blob: 77f22c80712a0690c851b6d843c3782c985b0ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
# Harden coloring results with 5 seeds: full-vs-1step solve, LE AUROC, PTRM(sigma=0.2) for none/rwse.
set -uo pipefail
cd /home/yurenh2/rrog
export PYTHONPATH=/home/yurenh2/rrog
echo "host=$(hostname) gpu=${CUDA_VISIBLE_DEVICES:-?} start=$(date -Is)"
for s in 0 1 2 3 4; do
  for cfg in "full none" "full rwse" "1step none"; do
    set -- $cfg; gm=$1; pe=$2
    ck=runs/ckpt_color_${gm}_${pe}_n50_k3_p0.2_T3_ns3_s${s}.pt
    echo "===== seed=$s $gm $pe ====="
    python3 diag/train_color.py --mode train --grad_mode "$gm" --pe "$pe" --p 0.2 --epochs 150 --seed "$s" \
      || echo "!! train $gm $pe s$s failed"
    python3 diag/train_color.py --mode le --ckpt "$ck" || echo "!! le $gm $pe s$s failed"
    if [ "$gm" = "full" ]; then
      python3 diag/ptrm_color.py --ckpt "$ck" --K 16 --n_graphs 150 --sigmas 0.2 || echo "!! ptrm $pe s$s failed"
    fi
  done
done
echo "===== AGGREGATE ====="
python3 diag/aggregate.py
echo "done=$(date -Is)"