-
Notifications
You must be signed in to change notification settings - Fork 6
/
submit_script_3_inference.sh
47 lines (40 loc) · 1.55 KB
/
submit_script_3_inference.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
#!/bin/bash
#SBATCH --job-name=EvalCond
#SBATCH --time=0-03:45:00
#SBATCH -G nvidia-a100:1
#SBATCH --mem-per-cpu=16G
# 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"
echo -t "\t-m 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."
exit 1 # Exit script after printing help
}
while getopts "t:e:m:n:" opt
do
case "$opt" in
t ) TemplateName="$OPTARG" ;;
e ) ExperimentName="$OPTARG" ;;
m ) ModelID="$OPTARG" ;;
n ) EnsembleMembers="$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" ]
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 TORCH311
python s3_write_predictions_conditional_pixel_diffusion.py +data.template=$TemplateName +experiment=$ExperimentName +model_name=$ModelID +n_ensemble_members=$EnsembleMembers