summaryrefslogtreecommitdiff
path: root/research/flossing/launch_engelken_python_official_queue.sh
blob: d1b3faf845af3fa5bc6d9aa1a5368b49e5e5ebf1 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env bash
set -euo pipefail

cd /home/yurenh2/rrm

PY="/home/yurenh2/miniconda3/envs/rrm/bin/python"
SCRIPT="research/flossing/engelken_python_flossing.py"
OUT_DIR="research/flossing/engelken_python"
mkdir -p "${OUT_DIR}"

common=(
  --hidden-size 80
  --n-lyap 40
  --train-epochs 1000
  --inter-period 100
  --inter-epochs 100
  --batch-size 16
  --input-dim 1
  --train-steps 300
  --lyap-steps 55
  --floss-input-steps 300
  --seed-ic 1
  --seed-input 1
  --seed-net 1
  --seed-ons 1
  --lr 0.001
  --beta1 0.9
  --beta2 0.999
  --init-type 1
  --recurrent-gain 1.0
  --recurrent-mean-gain 0.0
  --input-scale 1.0
  --delay 10
  --ws-std 1.0
  --ws-mean 0.0
  --wr-std 1.0
  --wr-mean 0.0
  --b-std 0.1
  --b-mean 0.0
  --task -1
  --lyap-target 0.0
  --eval-every 100
  --eval-batches 4
  --log-every-floss 25
  --device cuda
)

run_case() {
  local gpu="$1"
  local name="$2"
  shift 2
  CUDA_VISIBLE_DEVICES="${gpu}" PYTHONUNBUFFERED=1 "${PY}" "${SCRIPT}" \
    "${common[@]}" "$@" \
    --out "${OUT_DIR}/${name}.json" \
    > "${OUT_DIR}/${name}.log" 2>&1
}

(
  run_case 2 "official_py_baseline_no_floss_N80_k40_E1000" \
    --pre-epochs 0 --max-inter-episodes 0
  run_case 2 "official_py_pre_inter_N80_k40_E1000" \
    --pre-epochs 100 --max-inter-episodes 2
) &
echo $! > "${OUT_DIR}/gpu2_python_queue.pid"

(
  run_case 3 "official_py_prefloss_N80_k40_E1000" \
    --pre-epochs 100 --max-inter-episodes 0
) &
echo $! > "${OUT_DIR}/gpu3_python_queue.pid"

echo "queued Engelken Python official-analogue runs"
echo "gpu2 queue pid: $(cat "${OUT_DIR}/gpu2_python_queue.pid")"
echo "gpu3 queue pid: $(cat "${OUT_DIR}/gpu3_python_queue.pid")"