AsianPlayer/TriDrive / code /weak /run_dms_pretrain_chain.sh
AsianPlayer's picture
download
raw
2.8 kB
#!/bin/bash
# cwm3/weak/run_dms_pretrain_chain.sh — sequential DMS-teacher pretraining chain (one trainer of ours alive at a time; no GPU lock).
# 1. fine-tune wrapper smoke (smoke trunk, 20k anchors, 1 epoch, val prediction only)
# 2. weak/dms_teacher_pretrain.py seeds 0,1,2 -> results/runs/U0_dmspre_trunk_s<k>/trunk.pt
# 3. train/train_u0_from_init.py seeds 0,1,2 -> results/runs/U0_kin_can_noK_dmspre_s<k>/ (unchanged train_cwm3.py, --no-lock)
# 4. evaluations where the scratch baseline results/runs/U0_kin_can_noK_s<k>/PRED_DONE exists: eval/paired_compare.py (both regimes),
# eval/kin_repro.py, eval/shift_twin.py (K5). Missing baselines are re-evaluated later by hand (weak/report_dms_teacher_pretrain.py lists them).
set -u
cd /home/USER/cwm3
PY=python
export OMP_NUM_THREADS=4 MKL_NUM_THREADS=4
STAMP=$(date -u +%Y%m%dT%H%M%SZ)
LOG=results/runs/dmspre_chain_${STAMP}.log
echo "[chain] start $STAMP" | tee -a "$LOG"
if [ ! -f results/runs/U0_kin_can_noK_dmspre_s0_smoke_max20000/PRED_DONE ]; then
$PY train/train_u0_from_init.py --seed 0 --trunk results/runs/U0_dmspre_trunk_s0_smoke_max30000/trunk.pt \
--out results/runs/U0_kin_can_noK_dmspre_s0_smoke_max20000 --max-anchors 20000 --epochs 1 --pred-splits val 2>&1 | tail -20 | tee -a "$LOG"
[ -f results/runs/U0_kin_can_noK_dmspre_s0_smoke_max20000/PRED_DONE ] || { echo "[chain] smoke FAILED" | tee -a "$LOG"; exit 1; }
fi
for s in 0 1 2; do
[ -f results/runs/U0_dmspre_trunk_s$s/TRAIN_DONE ] || $PY weak/dms_teacher_pretrain.py --seed $s 2>&1 | grep -v "cwm3_dataset\]" | tail -25 | tee -a "$LOG"
[ -f results/runs/U0_dmspre_trunk_s$s/TRAIN_DONE ] || { echo "[chain] pretrain s$s FAILED" | tee -a "$LOG"; exit 1; }
done
for s in 0 1 2; do
[ -f results/runs/U0_kin_can_noK_dmspre_s$s/PRED_DONE ] || $PY train/train_u0_from_init.py --seed $s 2>&1 | tail -15 | tee -a "$LOG"
[ -f results/runs/U0_kin_can_noK_dmspre_s$s/PRED_DONE ] || { echo "[chain] fine-tune s$s FAILED" | tee -a "$LOG"; exit 1; }
done
for s in 0 1 2; do
A=results/runs/U0_kin_can_noK_dmspre_s$s; B=results/runs/U0_kin_can_noK_s$s
if [ -f $B/PRED_DONE ]; then
for r in engaged manual; do $PY eval/paired_compare.py --regime $r --a $A --b $B --tag dmspre_s$s 2>&1 | tail -8 | tee -a "$LOG"; done
for r in engaged manual; do $PY eval/shift_twin.py --a $A --b $B --regime $r --tag dmspre_s$s 2>&1 | tail -12 | tee -a "$LOG"; done
else
echo "[chain] baseline $B not finished: paired_compare / shift_twin for s$s deferred" | tee -a "$LOG"
fi
done
$PY eval/kin_repro.py --run-dirs results/runs/U0_kin_can_noK_dmspre_s0 results/runs/U0_kin_can_noK_dmspre_s1 results/runs/U0_kin_can_noK_dmspre_s2 2>&1 | tail -12 | tee -a "$LOG"
echo "[chain] CHAIN_DONE $(date -u +%Y%m%dT%H%M%SZ)" | tee -a "$LOG"

Xet Storage Details

Size:
2.8 kB
·
Xet hash:
7700d7542f28fba18c0e9d166adc99e92c20758ec85445869fca649667d41c46

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.