-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_prompt.bash
35 lines (26 loc) · 915 Bytes
/
run_prompt.bash
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
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --ntasks-per-node=1
#SBATCH -J meta-learning-synthetic-data
#SBATCH --output=/home/hgf_hmgu/hgf_tfv0045/meta-learning-synthetic-data/outputs/%x.out
#SBATCH --error=/home/hgf_hmgu/hgf_tfv0045/meta-learning-synthetic-data/outputs/%x.err
#SBATCH --partition=normal
#SBATCH --time=8:00:00
#SBATCH --gres=gpu:4
# Your other commands
CODE_PATH="/home/hgf_hmgu/hgf_tfv0045/meta-learning-synthetic-data"
OUT_PATH="/home/hgf_hmgu/hgf_tfv0045/meta-learning-synthetic-data/outputs"
# Check if the directory exists
if [ ! -d "$OUT_PATH" ]; then
# Directory does not exist, so create it
mkdir -p "$OUT_PATH"
echo "Directory created: $OUT_PATH"
else
echo "Directory already exists: $OUT_PATH"
fi
source ~/.bash_profile
# Activate your environment
source env/bin/activate
# Run your Python script
srun python ${CODE_PATH}/src/synth_data_prompt.py