summaryrefslogtreecommitdiff
path: root/research/flossing/run_step4_pipeline.sh
blob: dc2d86d92ed13285207383e92d31c11c2b01eb94 (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
#!/bin/bash
set -e
cd /home/yurenh2/rrm/research/flossing
source /home/yurenh2/miniconda3/etc/profile.d/conda.sh
conda activate rrm
export CUDA_VISIBLE_DEVICES=2

# Wait for Phase 1 (PID $1) to complete
P1_PID=$1
echo "[$(date '+%H:%M:%S')] runner waiting for Phase 1 PID $P1_PID..." >> step4_runner.log
while kill -0 "$P1_PID" 2>/dev/null; do
  sleep 30
done
echo "[$(date '+%H:%M:%S')] Phase 1 done. Starting Phase 2: CF λ*=0" >> step4_runner.log

# Phase 2: CF λ*=0
python step4_from_scratch.py \
  --n-steps 3000 --batch-size 8 \
  --alpha-rf 10.0 --lambda-star 0.0 \
  --warmup-steps 200 \
  --eval-every 300 --eval-n 512 --eval-batch-size 32 \
  --out step4_Y_cf_lstar0_fromscratch.json \
  > step4_Y.log 2>&1

echo "[$(date '+%H:%M:%S')] Phase 2 done. Starting Phase 3: CF λ*=-0.15" >> step4_runner.log

# Phase 3: CF λ*=-0.15 (natural attractor enforced)
python step4_from_scratch.py \
  --n-steps 3000 --batch-size 8 \
  --alpha-rf 10.0 --lambda-star -0.15 \
  --warmup-steps 200 \
  --eval-every 300 --eval-n 512 --eval-batch-size 32 \
  --out step4_Z_cf_lstar_neg15_fromscratch.json \
  > step4_Z.log 2>&1

echo "[$(date '+%H:%M:%S')] Pipeline complete (X + Y + Z all done)" >> step4_runner.log