blob: 71ddba116892a7a741698d354ac07c9d609caa0a (
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
|
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT_DIR}"
export PYTHONPATH="${ROOT_DIR}:${PYTHONPATH:-}"
TASK="${TASK:-ogbg-molhiv}"
DEVICE="${DEVICE:-cuda:1}"
EPOCHS="${EPOCHS:-100}"
SEED="${SEED:-0}"
HIDDEN="${HIDDEN:-128}"
FIXED_T="${FIXED_T:-3}"
FIXED_NS="${FIXED_NS:-3}"
VIEWS="${VIEWS:-gin gine gcn graphsage gatv2 graphconv transformer pna gen film resgated tag sgc cheb arma mf appnp}"
mkdir -p runs logs
result_path() {
local view="$1"
local compute="$2"
local t="$3"
local ns="$4"
echo "runs/${TASK}_${view}_${compute}_T${t}_ns${ns}_h${HIDDEN}_e${EPOCHS}_s${SEED}.json"
}
run_cell() {
local view="$1"
local compute="$2"
local t="$3"
local ns="$4"
local out
out="$(result_path "${view}" "${compute}" "${t}" "${ns}")"
if [[ -f "${out}" ]]; then
echo "[skip] ${out}"
return
fi
echo "[run] ${TASK} view=${view} compute=${compute} T=${t} ns=${ns} device=${DEVICE}"
python3 -m rrog.cli run \
--task "${TASK}" \
--view "${view}" \
--compute "${compute}" \
--epochs "${EPOCHS}" \
--hidden "${HIDDEN}" \
--T "${t}" \
--n_sup "${ns}" \
--seed "${SEED}" \
--device "${DEVICE}"
}
for view in ${VIEWS}; do
run_cell "${view}" classic 0 1
run_cell "${view}" fixed-rrog "${FIXED_T}" "${FIXED_NS}"
done
python3 -m rrog.cli results --epochs "${EPOCHS}"
|