summaryrefslogtreecommitdiff
path: root/rrog/run_ogb_hiv_remaining.sh
blob: 067e736f3dbddda45ceab90f556d36c236687308 (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
#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT_DIR}"
export PYTHONPATH="${ROOT_DIR}:${PYTHONPATH:-}"

DEVICE="${DEVICE:-cuda:3}"
EPOCHS="${EPOCHS:-100}"
SEED="${SEED:-0}"

run_if_missing() {
  local view="$1"
  local compute="$2"
  local t="$3"
  local ns="$4"
  local out="runs/ogbg-molhiv_${view}_${compute}_T${t}_ns${ns}_h128_e${EPOCHS}_s${SEED}.json"
  if [[ -f "${out}" ]]; then
    echo "[skip] ${out}"
    return
  fi
  echo "[run] view=${view} compute=${compute} T=${t} ns=${ns} device=${DEVICE}"
  python3 -m rrog.cli run \
    --task ogbg-molhiv \
    --view "${view}" \
    --compute "${compute}" \
    --epochs "${EPOCHS}" \
    --T "${t}" \
    --n_sup "${ns}" \
    --seed "${SEED}" \
    --device "${DEVICE}"
}

# Complete remaining OGB-HIV backbone x {classic, fixed-RRoG} cells.
# Existing json files are skipped, so the queue can be restarted safely.
run_if_missing sgc fixed-rrog 3 3
run_if_missing cheb classic 0 1
run_if_missing cheb fixed-rrog 3 3
run_if_missing arma classic 0 1
run_if_missing arma fixed-rrog 3 3
run_if_missing mf classic 0 1
run_if_missing mf fixed-rrog 3 3
run_if_missing appnp classic 0 1
run_if_missing appnp fixed-rrog 3 3
run_if_missing pna fixed-rrog 3 3
run_if_missing gine classic 0 1
run_if_missing gine fixed-rrog 3 3

python3 -m rrog.cli results --epochs "${EPOCHS}"