#!/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:0}" EPOCHS="${EPOCHS:-200}" SEED="${SEED:-0}" 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 t="$2" local ns="$3" local view_tag="" if [[ "${view}" != "gin" ]]; then view_tag="_${view}" fi echo "runs/rec_rrog${view_tag}_full_sig0.0_K1_none_T${t}_ns${ns}_trace_s${SEED}.json" } run_cell() { local view="$1" local compute="$2" local t="$3" local ns="$4" local out out="$(result_path "${view}" "${t}" "${ns}")" if [[ -f "${out}" ]]; then echo "[skip] ${out}" return fi echo "[run] zinc-cycle56 view=${view} compute=${compute} T=${t} ns=${ns} device=${DEVICE}" python3 -m rrog.cli run \ --task zinc-cycle56 \ --view "${view}" \ --compute "${compute}" \ --epochs "${EPOCHS}" \ --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 1 3 done python3 -m rrog.cli zinc-results --epochs "${EPOCHS}"