#!/bin/bash #SBATCH --job-name=qcpinn_cavity_public #SBATCH --cpus-per-task=4 #SBATCH --mem=16G #SBATCH --time=16:00:00 set -euo pipefail cd "${SLURM_SUBMIT_DIR:?Submit from the model package root}" export OMP_NUM_THREADS=1 export OPENBLAS_NUM_THREADS=1 export MKL_NUM_THREADS=1 export MPLBACKEND=Agg pids=() for seed in {0..9}; do ( python -u scripts/train.py --config config/config.yaml --seed "$seed" python -u scripts/inference.py --config config/config.yaml --seed "$seed" --kind best python -u scripts/inference.py --config config/config.yaml --seed "$seed" --kind last --metrics-only python -u scripts/result.py --config config/config.yaml --seed "$seed" ) & pids+=("$!") if ((${#pids[@]} == 4)); then for pid in "${pids[@]}"; do wait "$pid"; done pids=() fi done for pid in "${pids[@]}"; do wait "$pid"; done python -u scripts/result.py --config config/config.yaml --aggregate python -u scripts/inference.py --config config/config.yaml python -u scripts/result.py --config config/config.yaml