-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsubmit_script_13_inference_iterative.sh
50 lines (42 loc) · 1.67 KB
/
submit_script_13_inference_iterative.sh
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
47
48
49
50
#!/bin/bash
#SBATCH --job-name=EvalCondIter
#SBATCH --time=1-07:45:00
#SBATCH -G nvidia-a100:1
#SBATCH --mem-per-cpu=35G
# output files
#SBATCH -o /data/compoundx/WeatherDiff/job_log/%x-%u-%j.out
#SBATCH -e /data/compoundx/WeatherDiff/job_log/%x-%u-%j.err
# begin reading command line arguments
helpFunction()
{
echo ""
echo "Usage: $0 -t DatasetTemplateName -e ExperimentName -m modelName -n NEnsembleMembers -s NSteps"
echo -t "\t-t The name of the dataset template that should be used."
echo -e "\t-e The name of the experiment conducted on the dataset."
echo -e "\t-m The name of the model the predictions should be created with."
echo -e "\t-n The number of ensemble members to be created."
echo -e "\t-s The number of steps in the trajectories created."
exit 1 # Exit script after printing help
}
while getopts "t:e:m:n:s:" opt
do
case "$opt" in
t ) TemplateName="$OPTARG" ;;
e ) ExperimentName="$OPTARG" ;;
m ) ModelID="$OPTARG" ;;
n ) EnsembleMembers="$OPTARG" ;;
s ) Steps="$OPTARG" ;;
? ) helpFunction ;; # Print helpFunction in case parameter is non-existent
esac
done
# Print helpFunction in case parameters are empty
if [ -z "$TemplateName" ] || [ -z "$ExperimentName" ] || [ -z "$ModelID" ] || [ -z "$EnsembleMembers" ] || [ -z "$Steps" ]
then
echo "Some or all of the parameters are empty.";
helpFunction
fi
# stop reading command line arguments
module load Anaconda3/2020.07
source $EBROOTANACONDA3/etc/profile.d/conda.sh
conda activate WD_model
python s13_write_predictions_iterative.py +data.template=$TemplateName +experiment=$ExperimentName +model_name=$ModelID +n_ensemble_members=$EnsembleMembers +n_steps=$Steps