summaryrefslogtreecommitdiff
path: root/research/flossing/flossing_suite/smoke_test.sh
blob: 8b766b5dbb9335df7767cb20c1ece6f5a1a369a8 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
set -euo pipefail

GPU="${1:-0}"
ROOT="/home/yurenh2/rrm"
PY="/home/yurenh2/miniconda3/envs/rrm/bin/python"
OUT_DIR="${ROOT}/research/flossing/flossing_suite/results/smoke"
mkdir -p "${OUT_DIR}"
cd "${ROOT}"

echo "[smoke] toy RNN faithful port"
CUDA_VISIBLE_DEVICES="${GPU}" PYTHONUNBUFFERED=1 "${PY}" research/flossing/engelken_python_flossing.py \
  --hidden-size 16 \
  --n-lyap 4 \
  --train-epochs 3 \
  --pre-epochs 2 \
  --inter-epochs 0 \
  --max-inter-episodes 0 \
  --batch-size 4 \
  --train-steps 40 \
  --lyap-steps 30 \
  --floss-input-steps 40 \
  --eval-every 1 \
  --eval-batches 1 \
  --device cuda \
  --out "${OUT_DIR}/toy_smoke.json" \
  > "${OUT_DIR}/toy_smoke.log" 2>&1

echo "[smoke] TRM interfloss analogue"
CUDA_VISIBLE_DEVICES="${GPU}" PYTHONUNBUFFERED=1 "${PY}" research/flossing/step7_interfloss.py \
  --model trm \
  --ckpt-root "${ROOT}/trm/checkpoints/Sudoku-extreme-1k-aug-1000-ACT-torch/pretrain_mlp_t_sudoku_official_gbs768_repro" \
  --ckpt-name __random__ \
  --init-seed 123 \
  --train-steps 1 \
  --batch-size 2 \
  --train-lr 1e-4 \
  --floss-lr 1e-4 \
  --floss-steps 1 \
  --interfloss-at 0 \
  --floss-mode engelken_l2 \
  --lambda-star 0 \
  --k-lyap 1 \
  --lyap-act-steps 1 \
  --seed 42 \
  --eval-every 1 \
  --eval-n 8 \
  --eval-batch-size 8 \
  --floss-log-every 1 \
  --no-eval-after-floss \
  --train-puzzle-emb \
  --puzzle-emb-lr 1e-4 \
  --puzzle-emb-weight-decay 1.0 \
  --out "${OUT_DIR}/trm_step7_smoke.json" \
  > "${OUT_DIR}/trm_step7_smoke.log" 2>&1

echo "[smoke] summarizer"
"${PY}" research/flossing/flossing_suite/summarize_flossing.py \
  > "${OUT_DIR}/summarize_smoke.log" 2>&1

echo "smoke OK: ${OUT_DIR}"