-
Notifications
You must be signed in to change notification settings - Fork 1
/
02_qm9_train.sh
88 lines (76 loc) · 2.59 KB
/
02_qm9_train.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash -l
# Passed via command line
RUN_WHAT="$1"
EXECUTABLE="${2:-echo}"
N_ENSEMBLES=30
PRINT_EVERY_EPOCH=50
N_GPU=1
MAX_EPOCHS=2000
run_random_qm9()
{
WORKDIR=data/qm9/ml_ready/random_splits
PCA="$1"
if [ "$PCA" = true ]; then
declare -a paths=(
"XANES-220712-ACSF-O-RANDOM-SPLITS-PCA-decomp-maxcol-21"
"XANES-220712-ACSF-N-RANDOM-SPLITS-PCA-decomp-maxcol-25"
"XANES-220712-ACSF-C-RANDOM-SPLITS-PCA-decomp-maxcol-23"
)
else
declare -a paths=(
"XANES-220712-ACSF-O-RANDOM-SPLITS"
"XANES-220712-ACSF-N-RANDOM-SPLITS"
"XANES-220712-ACSF-C-RANDOM-SPLITS"
)
fi
declare -a downsample_values=(0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1)
for path in "${paths[@]}"; do
for downsample_prop in "${downsample_values[@]}"; do
"$EXECUTABLE" .02_qm9_train.sbatch.sh \
--data-path "$WORKDIR"/"$path".pkl \
--ensemble-name Ensembles/"$path"/"$downsample_prop" \
--downsample-prop "$downsample_prop" \
--print-every-epoch "$PRINT_EVERY_EPOCH" \
--n-gpu "$N_GPU" \
-n "$N_ENSEMBLES" \
--max-epochs "$MAX_EPOCHS"
done
done
}
run_generalization()
{
WORKDIR=data/qm9/ml_ready/by_total_atoms
declare -a paths=(
XANES-220711-ACSF-C-TRAIN-ATMOST-5-TOTAL-ATOMS
XANES-220711-ACSF-N-TRAIN-ATMOST-7-TOTAL-ATOMS
XANES-220711-ACSF-C-TRAIN-ATMOST-6-TOTAL-ATOMS
XANES-220711-ACSF-N-TRAIN-ATMOST-8-TOTAL-ATOMS
XANES-220711-ACSF-C-TRAIN-ATMOST-7-TOTAL-ATOMS
XANES-220711-ACSF-O-TRAIN-ATMOST-5-TOTAL-ATOMS
XANES-220711-ACSF-C-TRAIN-ATMOST-8-TOTAL-ATOMS
XANES-220711-ACSF-O-TRAIN-ATMOST-6-TOTAL-ATOMS
XANES-220711-ACSF-N-TRAIN-ATMOST-5-TOTAL-ATOMS
XANES-220711-ACSF-O-TRAIN-ATMOST-7-TOTAL-ATOMS
XANES-220711-ACSF-N-TRAIN-ATMOST-6-TOTAL-ATOMS
XANES-220711-ACSF-O-TRAIN-ATMOST-8-TOTAL-ATOMS
)
for path in "${paths[@]}"; do
"$EXECUTABLE" .02_qm9_train.sbatch.sh \
--data-path "$WORKDIR"/"$path".pkl \
--ensemble-name Ensembles/"$path"/0.9 \
--downsample-prop 0.9 \
--print-every-epoch "$PRINT_EVERY_EPOCH" \
--n-gpu "$N_GPU" \
-n "$N_ENSEMBLES" \
--max-epochs "$MAX_EPOCHS"
done
}
if [ "$RUN_WHAT" = "qm9-pca" ]; then
run_random_qm9 true
elif [ "$RUN_WHAT" = "qm9" ]; then
run_random_qm9 false
elif [ "$RUN_WHAT" = "gen" ]; then
run_generalization
else
echo "Unknown input"
fi