File size: 1,035 Bytes
d647964 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/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
|