-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathrun_lrgb_slurm.sh
More file actions
156 lines (111 loc) · 9.05 KB
/
run_lrgb_slurm.sh
File metadata and controls
156 lines (111 loc) · 9.05 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/usr/bin/env bash
# Run this script from the project root dir.
function run_repeats {
dataset=$1
cfg_suffix=$2
# The cmd line cfg overrides that will be passed to the main.py,
# e.g. 'name_tag test01 gnn.layer_type gcnconv'
cfg_overrides=$3
cfg_file="${cfg_dir}/${dataset}-${cfg_suffix}.yaml"
if [[ ! -f "$cfg_file" ]]; then
echo "WARNING: Config does not exist: $cfg_file"
echo "SKIPPING!"
return 1
fi
main="python main.py --cfg ${cfg_file}"
out_dir="results/${dataset}" # <-- Set the output dir.
common_params="out_dir ${out_dir} ${cfg_overrides}"
echo "Run program: ${main}"
echo " output dir: ${out_dir}"
# Run each repeat as a separate job
for SEED in {0..3}; do
# script="sbatch ${slurm_directive} -J ${cfg_suffix}-${dataset} run/wrapper.sb ${main} --repeat 1 seed ${SEED} ${common_params}"
script="sbatch ${slurm_directive} -J ${cfg_suffix}-${dataset} run/wrapper-narval.sb ${main} --repeat 1 seed ${SEED} ${common_params}"
echo $script
eval $script
done
}
echo "Do you wish to sbatch jobs? Assuming this is the project root dir: `pwd`"
select yn in "Yes" "No"; do
case $yn in
Yes ) break;;
No ) exit;;
esac
done
################################################################################
##### Transformer+LapPE
################################################################################
## 1.1 VOCSuperpixels
cfg_dir="configs/GT"
slurm_directive="--time=0-11:59:00 --mem=16G --gres=gpu:1 --cpus-per-task=4"
# 1.1.1 Transformer+LapPE VOCSuperpixels slic 10
run_repeats vocsuperpixels Transformer+LapPE "wandb.project lrgb-voc name_tag Transformer-LapPE-VOC-COOgraph-slic10 dataset.name edge_wt_only_coord dataset.slic_compactness 10"
run_repeats vocsuperpixels Transformer+LapPE "wandb.project lrgb-voc name_tag Transformer-LapPE-VOC-COOFEATgraph-slic10 dataset.name edge_wt_coord_feat dataset.slic_compactness 10"
run_repeats vocsuperpixels Transformer+LapPE "wandb.project lrgb-voc name_tag Transformer-LapPE-VOC-RBgraph-slic10 dataset.name edge_wt_region_boundary dataset.slic_compactness 10"
# 1.1.2 Transformer+LapPE VOCSuperpixels slic 30
run_repeats vocsuperpixels Transformer+LapPE "wandb.project lrgb-voc name_tag Transformer-LapPE-VOC-COOgraph-slic30 dataset.name edge_wt_only_coord dataset.slic_compactness 30"
run_repeats vocsuperpixels Transformer+LapPE "wandb.project lrgb-voc name_tag Transformer-LapPE-VOC-COOFEATgraph-slic30 dataset.name edge_wt_coord_feat dataset.slic_compactness 30"
run_repeats vocsuperpixels Transformer+LapPE "wandb.project lrgb-voc name_tag Transformer-LapPE-VOC-RBgraph-slic30 dataset.name edge_wt_region_boundary dataset.slic_compactness 30"
## 1.2 COCOSuperpixels
cfg_dir="configs/GT"
slurm_directive="--time=0-23:59:00 --mem=64G --gres=gpu:1 --cpus-per-task=4"
# 1.2.1 Transformer+LapPE COCOSuperpixels slic 10
run_repeats cocosuperpixels Transformer+LapPE "wandb.project lrgb-coco name_tag Transformer-LapPE-COCO-COOgraph-slic10 dataset.name edge_wt_only_coord dataset.slic_compactness 10"
run_repeats cocosuperpixels Transformer+LapPE "wandb.project lrgb-coco name_tag Transformer-LapPE-COCO-COOFEATgraph-slic10 dataset.name edge_wt_coord_feat dataset.slic_compactness 10"
run_repeats cocosuperpixels Transformer+LapPE "wandb.project lrgb-coco name_tag Transformer-LapPE-COCO-RBgraph-slic10 dataset.name edge_wt_region_boundary dataset.slic_compactness 10"
# 1.2.2 Transformer+LapPE COCOSuperpixels slic 30
run_repeats cocosuperpixels Transformer+LapPE "wandb.project lrgb-coco name_tag Transformer-LapPE-COCO-COOgraph-slic30 dataset.name edge_wt_only_coord dataset.slic_compactness 30"
run_repeats cocosuperpixels Transformer+LapPE "wandb.project lrgb-coco name_tag Transformer-LapPE-COCO-COOFEATgraph-slic30 dataset.name edge_wt_coord_feat dataset.slic_compactness 30"
run_repeats cocosuperpixels Transformer+LapPE "wandb.project lrgb-coco name_tag Transformer-LapPE-COCO-RBgraph-slic30 dataset.name edge_wt_region_boundary dataset.slic_compactness 30"
################################################################################
##### SAN
################################################################################
## 1.1 VOCSuperpixels
cfg_dir="configs/SAN"
slurm_directive="--time=2-11:59:00 --mem=16G --gres=gpu:1 --cpus-per-task=4"
# 1.1.1 SAN VOCSuperpixels slic 10
run_repeats vocsuperpixels SAN "wandb.project lrgb-voc name_tag SAN-VOC-COOgraph-slic10 dataset.name edge_wt_only_coord dataset.slic_compactness 10"
run_repeats vocsuperpixels SAN "wandb.project lrgb-voc name_tag SAN-VOC-COOFEATgraph-slic10 dataset.name edge_wt_coord_feat dataset.slic_compactness 10"
run_repeats vocsuperpixels SAN "wandb.project lrgb-voc name_tag SAN-VOC-RBgraph-slic10 dataset.name edge_wt_region_boundary dataset.slic_compactness 10"
# 1.1.2 SAN VOCSuperpixels slic 30
run_repeats vocsuperpixels SAN "wandb.project lrgb-voc name_tag SAN-VOC-COOgraph-slic30 dataset.name edge_wt_only_coord dataset.slic_compactness 30"
run_repeats vocsuperpixels SAN "wandb.project lrgb-voc name_tag SAN-VOC-COOFEATgraph-slic30 dataset.name edge_wt_coord_feat dataset.slic_compactness 30"
run_repeats vocsuperpixels SAN "wandb.project lrgb-voc name_tag SAN-VOC-RBgraph-slic30 dataset.name edge_wt_region_boundary dataset.slic_compactness 30"
## 1.2 COCOSuperpixels
cfg_dir="configs/SAN"
slurm_directive="--time=2-11:59:00 --mem=64G --gres=gpu:1 --cpus-per-task=4"
# 1.2.1 SAN COCOSuperpixels slic 10
run_repeats cocosuperpixels SAN "wandb.project lrgb-coco name_tag SAN-COCO-COOgraph-slic10 dataset.name edge_wt_only_coord dataset.slic_compactness 10"
run_repeats cocosuperpixels SAN "wandb.project lrgb-coco name_tag SAN-COCO-COOFEATgraph-slic10 dataset.name edge_wt_coord_feat dataset.slic_compactness 10"
run_repeats cocosuperpixels SAN "wandb.project lrgb-coco name_tag SAN-COCO-RBgraph-slic10 dataset.name edge_wt_region_boundary dataset.slic_compactness 10"
# 1.2.2 SAN COCOSuperpixels slic 30
slurm_directive="--time=2-11:59:00 --mem=72G --gres=gpu:1 --cpus-per-task=4" # SAN needs even more RAM on COCO-slic30
run_repeats cocosuperpixels SAN "wandb.project lrgb-coco name_tag SAN-COCO-COOgraph-slic30 dataset.name edge_wt_only_coord dataset.slic_compactness 30"
run_repeats cocosuperpixels SAN "wandb.project lrgb-coco name_tag SAN-COCO-COOFEATgraph-slic30 dataset.name edge_wt_coord_feat dataset.slic_compactness 30"
run_repeats cocosuperpixels SAN "wandb.project lrgb-coco name_tag SAN-COCO-RBgraph-slic30 dataset.name edge_wt_region_boundary dataset.slic_compactness 30"
################################################################################
##### SAN-RWSE
################################################################################
## 1.1 VOCSuperpixels
cfg_dir="configs/SAN"
slurm_directive="--time=2-11:59:00 --mem=16G --gres=gpu:1 --cpus-per-task=4"
# 1.1.1 SAN VOCSuperpixels slic 10
run_repeats vocsuperpixels SAN+RWSE "wandb.project lrgb-voc name_tag SAN-RWSE-VOC-COOgraph-slic10 dataset.name edge_wt_only_coord dataset.slic_compactness 10"
run_repeats vocsuperpixels SAN+RWSE "wandb.project lrgb-voc name_tag SAN-RWSE-VOC-COOFEATgraph-slic10 dataset.name edge_wt_coord_feat dataset.slic_compactness 10"
run_repeats vocsuperpixels SAN+RWSE "wandb.project lrgb-voc name_tag SAN-RWSE-VOC-RBgraph-slic10 dataset.name edge_wt_region_boundary dataset.slic_compactness 10"
# 1.1.2 SAN VOCSuperpixels slic 30
run_repeats vocsuperpixels SAN+RWSE "wandb.project lrgb-voc name_tag SAN-RWSE-VOC-COOgraph-slic30 dataset.name edge_wt_only_coord dataset.slic_compactness 30"
run_repeats vocsuperpixels SAN+RWSE "wandb.project lrgb-voc name_tag SAN-RWSE-VOC-COOFEATgraph-slic30 dataset.name edge_wt_coord_feat dataset.slic_compactness 30"
run_repeats vocsuperpixels SAN+RWSE "wandb.project lrgb-voc name_tag SAN-RWSE-VOC-RBgraph-slic30 dataset.name edge_wt_region_boundary dataset.slic_compactness 30"
## 1.2 COCOSuperpixels
cfg_dir="configs/SAN"
slurm_directive="--time=2-11:59:00 --mem=64G --gres=gpu:1 --cpus-per-task=4"
# 1.2.1 SAN COCOSuperpixels slic 10
run_repeats cocosuperpixels SAN+RWSE "wandb.project lrgb-coco name_tag SAN-RWSE-COCO-COOgraph-slic10 dataset.name edge_wt_only_coord dataset.slic_compactness 10"
run_repeats cocosuperpixels SAN+RWSE "wandb.project lrgb-coco name_tag SAN-RWSE-COCO-COOFEATgraph-slic10 dataset.name edge_wt_coord_feat dataset.slic_compactness 10"
run_repeats cocosuperpixels SAN+RWSE "wandb.project lrgb-coco name_tag SAN-RWSE-COCO-RBgraph-slic10 dataset.name edge_wt_region_boundary dataset.slic_compactness 10"
# 1.2.2 SAN COCOSuperpixels slic 30
slurm_directive="--time=2-11:59:00 --mem=72G --gres=gpu:1 --cpus-per-task=4" # SAN needs even more RAM on COCO-slic30
run_repeats cocosuperpixels SAN+RWSE "wandb.project lrgb-coco name_tag SAN-RWSE-COCO-COOgraph-slic30 dataset.name edge_wt_only_coord dataset.slic_compactness 30"
run_repeats cocosuperpixels SAN+RWSE "wandb.project lrgb-coco name_tag SAN-RWSE-COCO-COOFEATgraph-slic30 dataset.name edge_wt_coord_feat dataset.slic_compactness 30"
run_repeats cocosuperpixels SAN+RWSE "wandb.project lrgb-coco name_tag SAN-RWSE-COCO-RBgraph-slic30 dataset.name edge_wt_region_boundary dataset.slic_compactness 30"