File size: 1,329 Bytes
97aa5af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
#SBATCH --partition=gpu_h100
#SBATCH --gpus=1
#SBATCH --job-name=sioux_cranfield
#SBATCH --ntasks=1  
#SBATCH --time=04:00:00
#SBATCH --output=sioux_cranfield_output_%A.txt
#SBATCH --error=sioux_cranfield_error_%A.txt

# Load necessary modules (adjust based on your environment)
module purge
module load 2023
module load CUDA/12.1.1

# my miniconda3 path
export PATH="$HOME/miniconda3/bin:$PATH"
unset -f conda 2>/dev/null      
source "$HOME/miniconda3/etc/profile.d/conda.sh"

# Activate the conda environment
conda activate r3pm_net


if [[ -n "${SLURM_SUBMIT_DIR:-}" ]]; then
  REPO_ROOT="$(cd "${SLURM_SUBMIT_DIR}" && pwd)"
else
  REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
fi
cd "$REPO_ROOT" || { echo "ERROR: cannot cd to REPO_ROOT=${REPO_ROOT}" >&2; exit 1; }
if [[ ! -f "${REPO_ROOT}/pyproject.toml" ]]; then
  echo "ERROR: REPO_ROOT=${REPO_ROOT} is not the r3pm_net tree (missing pyproject.toml)." >&2
  echo "Run: cd /path/to/r3pm_net && sbatch scripts/sioux_cranfield.sh" >&2
  exit 1
fi

LOGDIR="${REPO_ROOT}/logs/slurm"
mkdir -p "$LOGDIR"
JOB_ID="${SLURM_JOB_ID:-local}"

# seeds=(42 61 92 114 123 456 789)
seeds=(42)

for seed in "${seeds[@]}"; do
  srun python scripts/eval_sioux_cranfield.py --seed "${seed}" \
    >"${LOGDIR}/sioux_cranfield_job${JOB_ID}_seed${seed}.log" 2>&1
done