-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_run_command.py
362 lines (328 loc) · 25 KB
/
get_run_command.py
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# standard config :
cfg = {
"MODEL": "LinearModelWeightedDrop",
"MODEL_DIR": "LinearModel",
"DATASET_PROCESSOR": "MNISTLoader",
"OUTPUT_TYPE": "NUMBERS",
"COLUMNS_TYPE": "OHV_ALL",
"LOAD_METHOD": "OVERSAMPLE_NON_MAX_TRAIN",
"LOSS": "NLLLoss",
"DROP_PROB": 0.2,
"OPTIMIZER": "SGD",
"LR": 0.001,
"BATCH_SIZE": 32,
"EPOCH": 3,
"PRINT_EVERY": 10,
"EVALUATION_METHODS": [
"ACCURACY",
"CONFUSION_MATRIX",
"PRECISION",
"RECALL",
"F1_SCORE",
"GMEAN"
],
"PROB_METHOD": "TANH"
}
# All combinations of differet dataset, models and split:
changes = [
# ["bow_nd_binary.json", "LinearModelNoDropout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["bow_sd_binary.json", "LinearModelDropout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["bow_standout_binary.json", "LinearModelStandout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["bow_gd_tanh_binary.json", "LinearModelGradBasedDrop", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, False, "TANH", None],
# ["bow_nd_grade.json", "LinearModelNoDropout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["bow_sd_grade.json", "LinearModelDropout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["bow_standout_grade.json", "LinearModelStandout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["bow_gd_tanh_grade.json", "LinearModelGradBasedDrop", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "TANH", None],
# ["bow_nd_binary_50_50.json", "LinearModelNoDropout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [500,500]],
# ["bow_sd_binary_50_50.json", "LinearModelDropout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [500,500]],
# ["bow_standout_binary_50_50.json", "LinearModelStandout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [500,500]],
# ["bow_gd_tanh_binary_50_50.json", "LinearModelGradBasedDrop", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, False, "TANH", [500,500]],
# ["bow_nd_grade_20_all.json", "LinearModelNoDropout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [200,200,200,200,200]],
# ["bow_sd_grade_20_all.json", "LinearModelDropout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [200,200,200,200,200]],
# ["bow_standout_grade_20_all.json", "LinearModelStandout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [200,200,200,200,200]],
# ["bow_gd_tanh_grade_20_all.json", "LinearModelGradBasedDrop", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "TANH", [200,200,200,200,200]],
# ["bow_nd_binary_10_90.json", "LinearModelNoDropout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [100,900]],
# ["bow_sd_binary_10_90.json", "LinearModelDropout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [100,900]],
# ["bow_standout_binary_10_90.json", "LinearModelStandout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [100,900]],
# ["bow_gd_tanh_binary_10_90.json", "LinearModelGradBasedDrop", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, False, "TANH", [100,900]],
# ["bow_nd_grade_80_5.json", "LinearModelNoDropout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["bow_sd_grade_80_5.json", "LinearModelDropout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["bow_standout_grade_80_5.json", "LinearModelStandout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["bow_wd_high_grade_80_5.json", "LinearModelWeightedDrop", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["bow_wd_low_grade_80_5.json", "LinearModelWeightedDrop", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "NORM", [50,50,50,50,800]],
# ["bow_gd_norm_grade_80_5.json", "LinearModelGradBasedDrop", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "NORM", [50,50,50,50,800]],
# ["bow_gd_tanh_grade_80_5.json", "LinearModelGradBasedDrop", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "TANH", [50,50,50,50,800]],
# ["bow_nd_binary_30_70.json", "LinearModelNoDropout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [300,700]],
# ["bow_sd_binary_30_70.json", "LinearModelDropout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [300,700]],
# ["bow_standout_binary_30_70.json", "LinearModelStandout", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [300,700]],
# ["bow_gd_tanh_binary_30_70.json", "LinearModelGradBasedDrop", "LinearModel", "BCELoss",
# "BoWKEATS", "BINARY", "ORIGINAL", 4, 10, 10, False, "TANH", [300,700]],
# ["bow_nd_grade_60_10.json", "LinearModelNoDropout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [100,100,100,100,600]],
# ["bow_sd_grade_60_10.json", "LinearModelDropout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [100,100,100,100,600]],
# ["bow_standout_grade_60_10.json", "LinearModelStandout", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [100,100,100,100,600]],
# ["bow_gd_tanh_grade_60_10.json", "LinearModelGradBasedDrop", "LinearModel", "NLLLoss",
# "BoWKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "TANH", [100,100,100,100,600]],
# ### MNIST
# ["mnist_nd.json", "LinearModelNoDropout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", None],
# ["mnist_sd.json", "LinearModelDropout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", None],
# ["mnist_standout.json", "LinearModelStandout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", None],
# ["mnist_gd_tanh.json", "LinearModelGradBasedDrop", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, False, "TANH", None],
# ["mnist_nd_20_all.json", "LinearModelNoDropout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", [5000,5000,5000,5000,5000,5000,5000,5000,5000,5000]],
# ["mnist_sd_20_all.json", "LinearModelDropout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", [5000,5000,5000,5000,5000,5000,5000,5000,5000,5000]],
# ["mnist_standout_20_all.json", "LinearModelStandout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", [5000,5000,5000,5000,5000,5000,5000,5000,5000,5000]],
# ["mnist_gd_tanh_20_all.json", "LinearModelGradBasedDrop", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, False, "TANH", [5000,5000,5000,5000,5000,5000,5000,5000,5000,5000]],
# ["mnist_nd_80_2.json", "LinearModelNoDropout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", [40000,1111,1111,1111,1111,1111,1111,1111,1111,1112]],
# ["mnist_sd_80_2.json", "LinearModelDropout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", [40000,1111,1111,1111,1111,1111,1111,1111,1111,1112]],
# ["mnist_standout_80_2.json", "LinearModelStandout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", [40000,1111,1111,1111,1111,1111,1111,1111,1111,1112]],
# ["mnist_gd_tanh_80_2.json", "LinearModelGradBasedDrop", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, False, "TANH", [40000,1111,1111,1111,1111,1111,1111,1111,1111,1112]],
# ["mnist_nd_60_4.json", "LinearModelNoDropout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", [30000,2222,2222,2222,2222,2222,2222,2222,2222,2224]],
# ["mnist_sd_60_4.json", "LinearModelDropout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", [30000,2222,2222,2222,2222,2222,2222,2222,2222,2224]],
# ["mnist_standout_60_4.json", "LinearModelStandout", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, True, "NORM", [30000,2222,2222,2222,2222,2222,2222,2222,2222,2224]]
# ["mnist_gd_tanh_60_4.json", "LinearModelGradBasedDrop", "LinearModel", "NLLLoss",
# "MNISTLoader", "NUMBERS", "ORIGINAL", 32, 1000, 10, False, "TANH", [30000,2222,2222,2222,2222,2222,2222,2222,2222,2224]],
## OHV
# ["grit_nd_binary.json", "GritNetNoDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_sd_binary.json", "GritNetSingleDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_gd_tanh_binary.json", "GritNetPerStepGradBasedDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, False, "TANH", None],
# ["grit_psd_binary.json", "GritNetPerStepDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_prnn_binary.json", "GritNetPerStepRNNDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_prd_binary.json", "GritNetPerStepRecurrentDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_pss_binary.json", "GritNetPerStepStandout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_nd_grade.json", "GritNetNoDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_sd_grade.json", "GritNetSingleDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_gd_tanh_grade.json", "GritNetPerStepGradBasedDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "TANH", None],
# ["grit_psd_grade.json", "GritNetPerStepDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_prnn_grade.json", "GritNetPerStepRNNDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_prd_grade.json", "GritNetPerStepRecurrentDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_pss_grade.json", "GritNetPerStepStandout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", None],
# ["grit_nd_binary_50_50.json", "GritNetNoDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [500,500]],
# ["grit_sd_binary_50_50.json", "GritNetSingleDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [500,500]],
# ["grit_gd_tanh_binary_50_50.json", "GritNetPerStepGradBasedDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, False, "TANH", [500,500]],
# ["grit_psd_binary_50_50.json", "GritNetPerStepDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [500,500]],
# ["grit_prnn_binary_50_50.json", "GritNetPerStepRNNDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [500,500]],
# ["grit_prd_50_50.json", "GritNetPerStepRecurrentDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [500,500]],
# ["grit_pss_50_50.json", "GritNetPerStepStandout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [500,500]],
# ["grit_nd_grade_20_all.json", "GritNetNoDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [200,200,200,200,200]],
# ["grit_sd_grade_20_all.json", "GritNetSingleDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [200,200,200,200,200]],
# ["grit_gd_tanh_grade_20_all.json", "GritNetPerStepGradBasedDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "TANH", [200,200,200,200,200]],
# ["grit_psd_grade_20_all.json", "GritNetPerStepDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [200,200,200,200,200]],
# ["grit_prnn_grade_20_all.json", "GritNetPerStepRNNDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "NORM", [200,200,200,200,200]],
# ["grit_prd_gade_20_all.json", "GritNetPerStepRecurrentDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "NORM", [200,200,200,200,200]],
# ["grit_pss_grade_20_all.json", "GritNetPerStepStandout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "TANH", [200,200,200,200,200]],
# ["grit_nd_binary_10_90.json", "GritNetNoDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [100,900]],
# ["grit_sd_binary_10_90.json", "GritNetSingleDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [100,900]],
# ["grit_gd_tanh_binary_10_90.json", "GritNetPerStepGradBasedDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, False, "TANH", [100,900]],
# ["grit_psd__binary_10_90.json", "GritNetPerStepDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [100,900]],
# ["grit_prnn_binary_10_90.json", "GritNetPerStepRNNDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [100,900]],
# ["grit_prd_binary_10_90.json", "GritNetPerStepRecurrentDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [100,900]],
# ["grit_pss_binary_10_90.json", "GritNetPerStepStandout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [100,900]],
# ["grit_nd_grade_80_5.json", "GritNetNoDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["grit_sd_grade_80_5.json", "GritNetSingleDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["grit_gd_tanh_grade_80_5.json", "GritNetPerStepGradBasedDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "TANH", [50,50,50,50,800]],
# ["grit_psd_grade_80_5.json", "GritNetPerStepDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["grit_prnn_grade_80_5.json", "GritNetPerStepRNNDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["grit_prd_grade_80_5.json", "GritNetPerStepRecurrentDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["grit_pss_grade_80_5.json", "GritNetPerStepStandout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [50,50,50,50,800]],
# ["grit_nd_binary_30_70.json", "GritNetNoDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [300,700]],
# ["grit_sd_binary_30_70.json", "GritNetSingleDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [300,700]],
# ["grit_gd_tanh_binary_30_70.json", "GritNetPerStepGradBasedDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, False, "TANH", [300,700]],
# ["grit_psd_binary_30_70.json", "GritNetPerStepDropout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [300,700]],
# ["grit_prnn_binary_30_70.json", "GritNetPerStepRNNDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [300,700]],
# ["grit_prd_binary_30_70.json", "GritNetPerStepRecurrentDrop", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [300,700]],
# ["grit_pss_binary_30_70.json", "GritNetPerStepStandout", "GritNet", "BCELoss",
# "OneHotKEATS", "BINARY", "ORIGINAL", 4, 10, 10, True, "NORM", [300,700]],
# ["grit_nd_grade_60_10.json", "GritNetNoDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [100,100,100,100,600]],
# ["grit_sd_grade_60_10.json", "GritNetSingleDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [100,100,100,100,600]],
# ["grit_gd_tanh_grade_60_10.json", "GritNetPerStepGradBasedDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, False, "TANH", [100,100,100,100,600]],
# ["grit_psd_grade_60_10.json", "GritNetPerStepDropout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [100,100,100,100,600]],
# ["grit_prnn_grade_60_10.json", "GritNetPerStepRNNDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [100,100,100,100,600]],
# ["grit_prd_grade_60_10.json", "GritNetPerStepRecurrentDrop", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [100,100,100,100,600]],
# ["grit_pss_grade_60_10.json", "GritNetPerStepStandout", "GritNet", "NLLLoss",
# "OneHotKEATS", "GRADE", "ORIGINAL", 4, 10, 10, True, "NORM", [100,100,100,100,600]],
# ["sentiment_nd_binary.json", "SimpleSentimentNoDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", None],
# ["sentiment_sd_binary.json", "SimpleSentimentSingleDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", None],
# ["sentiment_gd_tanh_binary.json", "SimpleSentimentPerStepGradBasedDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, False, "TANH", None],
# ["sentiment_psd_binary.json", "SimpleSentimentPerStepDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", None],
# ["sentiment_prnn_binary.json", "SimpleSentimentPerStepRNNDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", None],
# ["sentiment_prd_binary.json", "SimpleSentimentPerStepRecurrentDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", None],
# ["sentiment_pss_binary.json", "SimpleSentimentPerStepStandout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", None],
# ["sentiment_nd_binary_50_50.json", "SimpleSentimentNoDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [250000,250000]],
# ["sentiment_sd_binary_50_50.json", "SimpleSentimentSingleDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [250000,250000]],
# ["sentiment_gd_tanh_binary_50_50.json", "SimpleSentimentPerStepGradBasedDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, False, "TANH", [250000,250000]],
# ["sentiment_psd_binary_50_50.json", "SimpleSentimentPerStepDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [250000,250000]],
# ["sentiment_prnn_binary_50_50.json", "SimpleSentimentPerStepRNNDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [250000,250000]],
# ["sentiment_prd_50_50.json", "SimpleSentimentPerStepRecurrentDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [250000,250000]],
# ["sentiment_pss_50_50.json", "SimpleSentimentPerStepStandout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [250000,250000]],
# ["sentiment_nd_binary_10_90.json", "SimpleSentimentNoDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [50000,450000]],
# ["sentiment_sd_binary_10_90.json", "SimpleSentimentSingleDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [50000,450000]],
# ["sentiment_gd_tanh_binary_10_90.json", "SimpleSentimentPerStepGradBasedDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, False, "TANH", [50000,450000]],
# ["sentiment_psd__binary_10_90.json", "SimpleSentimentPerStepDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [50000,450000]],
# ["sentiment_prnn_binary_10_90.json", "SimpleSentimentPerStepRNNDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [50000,450000]],
# ["sentiment_prd_binary_10_90.json", "SimpleSentimentPerStepRecurrentDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [50000,450000]],
# ["sentiment_pss_binary_10_90.json", "SimpleSentimentPerStepStandout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [50000,450000]],
# ["sentiment_nd_binary_30_70.json", "SimpleSentimentNoDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [150000,350000]],
# ["sentiment_sd_binary_30_70.json", "SimpleSentimentSingleDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [150000,350000]],
# ["sentiment_gd_tanh_binary_30_70.json", "SimpleSentimentPerStepGradBasedDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, False, "TANH", [150000,350000]],
# ["sentiment_psd_binary_30_70.json", "SimpleSentimentPerStepDropout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [150000,350000]],
# ["sentiment_prnn_binary_30_70.json", "SimpleSentimentPerStepRNNDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [150000,350000]],
# ["sentiment_prd_binary_30_70.json", "SimpleSentimentPerStepRecurrentDrop", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [150000,350000]],
# ["sentiment_pss_binary_30_70.json", "SimpleSentimentPerStepStandout", "SimpleSentiment", "BCELoss",
# "Sentiment140", "BINARY", "ORIGINAL", 32, 1000, 10, True, "NORM", [150000,350000]],
]
import json
import os
# iterate through all combination and write a json file for each
for each_change in changes:
print("here")
with open(".\\configs\\"+each_change[0], 'w') as f:
c = cfg
c['MODEL'] = each_change[1]
c['MODEL_DIR'] = each_change[2]
c['LOSS'] = each_change[3]
c['DATASET_PROCESSOR'] = each_change[4]
c['OUTPUT_TYPE'] = each_change[5]
c['LOAD_METHOD'] = each_change[6]
c['BATCH_SIZE'] = each_change[7]
c['PRINT_EVERY'] = each_change[8]
c['EPOCH'] = each_change[9]
c['KEEP_HIGH_MAGNITUDE'] = each_change[10]
c['PROB_METHOD'] = each_change[11]
c['CLASS_SPLIT'] = each_change[12]
json.dump(c, f, indent=4)
# iterate through all json file and create a single command training all files
files = os.listdir('./configs')
start_command = "python main.py -tp .\\configs\\"
full_command = ""
for each in files:
if ".json" in each:
full_command += start_command+each+";"
print(full_command)