forked from Henry-E/E2E
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitialise_experiment_id.py
82 lines (75 loc) · 2.63 KB
/
initialise_experiment_id.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
import argparse
from collections import defaultdict
from sigopt import Connection
import time
parser = argparse.ArgumentParser(description='creating sigopt experiment id')
parser.add_argument('-parameters', default='default', help='which set of model training parameters to use')
parser.add_argument('-model_type', default='baseline', help='which type of data preprocessing is being used')
opts = parser.parse_args()
def main():
dict_of_list_of_dicts_of_parameters = \
{
'baseline':
[
{
'name': '-word_vec_dim',
'type': 'int',
'bounds':
{
'min': 100.0,
'max': 1000.0
}
}
],
'layers,dropout,vec_sizes':
[
{
'name': '-dropout',
'type': 'double',
'bounds': {
'min': 0.1,
'max': 0.5
}
},
{
'name': '-rnn_size',
'type': 'int',
'bounds': {
'min': 128,
'max': 1024
}
},
{
'name': '-word_vec_size',
'type': 'int',
'bounds': {
'min': 128,
'max': 1024
}
},
{
'name': '-layers',
'type': 'int',
'bounds': {
'min': 1,
'max': 3
}
}
]
}
test_dict = defaultdict(lambda:'lol', dict_of_list_of_dicts_of_parameters)
# get the set of parameters from the dict using the model name
# we really need to rename this stuff
model_parameters = test_dict[opts.parameters]
if model_parameters == 'lol':
print('27604')
quit()
now = time.strftime('%Y_%m_%d__%H_%M')
conn = Connection(client_token="IFAQZABYDOBABXMSZYAWSYKHYSONHNPEACATCSCCIDXDQFLG")
experiment = conn.experiments().create(
name='_'.join([opts.model_type, opts.parameters, now]),
parameters=model_parameters
)
print(experiment.id)
if __name__ == '__main__':
main()