File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ def post(self):
67
67
68
68
dataset_id = data ['datasetID' ]
69
69
model_id = data ['modelID' ]
70
+ # If only a subset of specified dataset is to be used, a list of the
71
+ # corresponding time series file names can be provided
70
72
ts_names = data .get ('ts_names' )
71
73
72
74
dataset = Dataset .get (Dataset .id == data ["datasetID" ])
@@ -89,6 +91,7 @@ def post(self):
89
91
90
92
executor = yield self ._get_executor ()
91
93
94
+ # If only a subset of the dataset is to be used, get specified files
92
95
if ts_names :
93
96
ts_uris = [f .uri for f in dataset .files if os .path .basename (f .name )
94
97
in ts_names or os .path .basename (f .name ).split ('.npz' )[0 ]
Original file line number Diff line number Diff line change @@ -217,17 +217,14 @@ def test_predict_specific_ts_name():
217
217
data = {'datasetID' : ds .id ,
218
218
'ts_names' : ['217801' ],
219
219
'modelID' : m .id }
220
- print ('data:' , data )
221
220
response = requests .post ('{}/predictions' .format (cfg ['server' ]['url' ]),
222
221
data = json .dumps (data )).json ()
223
- print ('response dict:' , response )
224
222
assert response ['status' ] == 'success'
225
223
226
224
n_secs = 0
227
225
while n_secs < 5 :
228
226
pred_info = requests .get ('{}/predictions/{}' .format (
229
227
cfg ['server' ]['url' ], response ['data' ]['id' ])).json ()
230
- print (pred_info )
231
228
if pred_info ['status' ] == 'success' and pred_info ['data' ]['finished' ]:
232
229
assert isinstance (pred_info ['data' ]['results' ]['217801' ]
233
230
['features' ]['total_time' ],
Original file line number Diff line number Diff line change @@ -96,7 +96,6 @@ def logs_from_config(supervisor_conf):
96
96
with nostdout ():
97
97
from cesium_app .config import cfg
98
98
99
- watched .append (cfg ['paths' ]['err_log_path' ])
100
99
watched .append ('log/error.log' )
101
100
watched .append ('log/nginx-error.log' )
102
101
You can’t perform that action at this time.
0 commit comments