#!/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}"