#!/bin/bash # Train CONFIG on one GPU, then evaluate its best epoch on the test split. # sbatch -A --export=ALL,SEED=1 scripts/train.sh [key=value ...] # The paper's ensembles vary only the seed (SEED=1..5). Prepare the event # cache first: uv run gnn4colliders prepare configs/gamgam.yaml #SBATCH -N 1 #SBATCH -C gpu #SBATCH -q shared #SBATCH -G 1 #SBATCH -c 32 #SBATCH -t 06:00:00 #SBATCH -o logs/train_%j.out set -euo pipefail cd "${SLURM_SUBMIT_DIR:-$(pwd)}" CONFIG="${CONFIG:-configs/gamgam.yaml}" SEED="${SEED:-42}" RUN="${RUN:-outputs/$(basename "${CONFIG}" .yaml)/seed${SEED}}" # PyTorch otherwise sizes CPU thread pools to every core on the node. export OMP_NUM_THREADS="${OMP_NUM_THREADS:-8}" # Home-directory file locks are unavailable on Perlmutter compute nodes. export UV_CACHE_DIR="${UV_CACHE_DIR:-${SCRATCH:-${HOME}/.cache}/uv}" # Hugging Face downloads (the Delphes samples are 52 GB) go to scratch too. export HF_HOME="${HF_HOME:-${SCRATCH:-${HOME}/.cache}/huggingface}" mkdir -p logs args=("${CONFIG}" run_dir="${RUN}" train.seed="${SEED}" data.seed="${SEED}" "$@") uv run gnn4colliders train "${args[@]}" uv run gnn4colliders evaluate "${args[@]}" split=test