Download scripts/train.sh from HWresearch/GNN4Colliders: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/HWresearch/GNN4Colliders/resolve/e71731f4373a94de06af1589654ada8cd48dc088/scripts/train.sh
- Command line
-
hf download hf://HWresearch/GNN4Colliders@e71731f4373a94de06af1589654ada8cd48dc088/scripts/train.sh
-
curl -L -o train.sh https://huggingface.co/HWresearch/GNN4Colliders/resolve/e71731f4373a94de06af1589654ada8cd48dc088/scripts/train.sh
1.19 kB
| # Train CONFIG on one GPU, then evaluate its best epoch on the test split. | |
| # sbatch -A <account> --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 | |