File size: 1,765 Bytes
cfa2024
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
# db overnight, from S1 on (latents of all splits encoded). gpu_hold.py grabs the GPU
# the moment it is free (other jobs are never stopped) and keeps it between our stages; each of our GPU processes takes
# it over itself right before allocating (gpu_take.take_gpu). encode -> S1 -> submission -> S2 + S3 -> submissions.
cd /home/db/ThuongBui/localization/vlr
ulimit -n "$(ulimit -Hn)" 2>/dev/null
PY=/home/db/miniforge3/envs/locnet/bin/python
D=/mnt/10TB_HDD/nuReasoning/vlr
BASE=$D/data/submission_base_G2_selA_ep05.json
hold() {                                          # start a holder unless one is alive
    [ -f /tmp/vlr_gpu_hold.pid ] && kill -0 "$(cat /tmp/vlr_gpu_hold.pid)" 2>/dev/null && return
    rm -f /tmp/vlr_gpu_held /tmp/vlr_gpu_release
    nohup $PY gpu_hold.py 9000 >> gpu_hold.log 2>&1 & sleep 1
}

hold
$PY vlr_s1.py --name s1_full --cache $D/cache --data $D/data --epochs 10 --batch 8 --export > s1_full.log 2>&1
hold
test -f runs/s1_full/test_answers.json || { echo "S1 failed"; exit 1; }
$PY vlr_submit.py --base $BASE --answers runs/s1_full/test_answers.json --out $D/submissions/submission_vlr_s1.json > submit.log 2>&1

$PY vlr_s1.py --name s23_full --model plan --init runs/s1_full/best.pt --ego-fut $D/data/ego_fut.pkl --cache $D/cache \
    --data $D/data --epochs 6 --batch 8 --lr 1e-4 --export > s23_full.log 2>&1
test -f runs/s23_full/test_traj.json || { echo "S2+S3 failed"; exit 1; }
$PY vlr_submit.py --base $BASE --answers runs/s23_full/test_answers.json --out $D/submissions/submission_vlr_s2.json >> submit.log 2>&1
$PY vlr_submit.py --base $BASE --answers runs/s23_full/test_answers.json --traj runs/s23_full/test_traj.json \
    --out $D/submissions/submission_vlr_s23.json >> submit.log 2>&1
echo CHAIN_DONE