summaryrefslogtreecommitdiff
path: root/rrog/run_zinc_gine.sh
blob: 1ca36e1fdcecd59f5b3c1a1730359a555a98b55c (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
#!/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:-200}"
SEED="${SEED:-0}"

run_if_missing() {
  local compute="$1"
  local t="$2"
  local ns="$3"
  local out="runs/rec_rrog_gine_full_sig0.0_K1_none_T${t}_ns${ns}_trace_s${SEED}.json"
  if [[ -f "${out}" ]]; then
    echo "[skip] ${out}"
    return
  fi
  echo "[run] zinc-cycle56 view=gine compute=${compute} T=${t} ns=${ns} device=${DEVICE}"
  python3 -m rrog.cli run \
    --task zinc-cycle56 \
    --view gine \
    --compute "${compute}" \
    --epochs "${EPOCHS}" \
    --T "${t}" \
    --n_sup "${ns}" \
    --seed "${SEED}" \
    --device "${DEVICE}"
}

run_if_missing classic 0 1
run_if_missing fixed-rrog 1 3

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