This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.py
149 lines (142 loc) · 2.79 KB
/
config.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
# Configuration file for the optimisation. Only static global variables.
#
# For testing whether the config is sane, please add tests to `test_config.py`
def StripFreeParams(point):
fixed_params = []
for low, high in FIXED_RANGES:
fixed_params += point[low:high]
return fixed_params
DEFAULT_POINT = [
70.0,
170.0,
205.,
205.,
280.,
245.,
305.,
240.,
40.0,
40.0,
150.0,
150.0,
2.0,
2.0,
80.0,
80.0,
150.0,
150.0,
2.0,
2.0,
87.,
65.,
35.,
121,
11.,
2.,
65.,
43.,
121.,
207.,
11.,
2.,
6.,
33.,
32.,
13.,
70.,
11.,
5.,
16.,
112.,
5.,
4.,
2.,
15.,
34.,
235.,
32.,
5.,
8.,
31.,
90.,
186.,
310.,
2.,
55.,
]
FIXED_RANGES = [(0, 2), (8, 20)]
FIXED_PARAMS = StripFreeParams(DEFAULT_POINT)
IMAGE = 'olantwin/ship-shield'
IMAGE_TAG = '20171222_T1'
COMPATIBLE_TAGS = {
'20171207_T1': ['20171222_T1'],
'20171222_T1': [
'20171207_T1',
],
'20180108_T1': [],
}
RESULTS_TEMPLATE = {
'error': 'Some',
'weight': None,
'length': None,
'muons': None,
'muons_w': None,
'args': None,
'status': None,
}
JOB_TEMPLATE = {
'input': [],
'container': {
'workdir':
'',
'name':
'{}:{}'.format(IMAGE, IMAGE_TAG),
'volumes': [
'/home/sashab1/ship-shield:/shield',
'/home/sashab1/ship/shared:/shared'
],
'cpu_needed':
1,
'max_memoryMB':
1024,
'min_memoryMB':
512,
'run_id':
'near_run3',
'cmd':
'''/bin/bash -l -c 'source /opt/FairShipRun/config.sh; '''
'''python2 /code/slave.py '''
'''--params {params} '''
'''-f /shield/worker_files/sampling_{sampling}/'''
'''muons_{job_id}_16.root '''
'''--results /output/result.json '''
'''--hists /output/hists_{IMAGE_TAG}_'''
'''{params}_{job_id}_{sampling}_{seed}.root --seed {seed}' ''',
},
'required_outputs': {
'output_uri': 'eos:/eos/experiment/ship/skygrid/histograms_raw',
'file_contents': [{
'file': 'result.json',
'to_variable': 'result'
}]
}
}
METADATA_TEMPLATE = {
'user': {
'tag': '',
'sampling': 37,
'seed': 1,
'image_tag': IMAGE_TAG,
'params': []
},
'disney': {}
}
RUN = 'discrete4'
POINTS_IN_BATCH = 20
RANDOM_STARTS = 100
MIN = [
70.0, 170.0, 208, 207, 281, 248, 305, 242, 40.0, 40.0, 150.0, 150.0, 2.0,
2.0, 80.0, 80.0, 150.0, 150.0, 2.0, 2.0, 72, 51, 29, 46, 10, 7, 54, 38, 46,
192, 14, 9, 10, 31, 35, 31, 51, 11, 3, 32, 54, 24, 8, 8, 22, 32, 209, 35,
8, 13, 33, 77, 85, 241, 9, 26
]