Skip to content

Commit 64bc1f0

Browse files
committed
some improvements
1 parent 64d13f5 commit 64bc1f0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ramp-engine/ramp_engine/dispatcher.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def collect_result(self, session):
212212
for worker, (submission_id, submission_name) in zip(workers,
213213
submissions):
214214
dt = worker.time_since_last_status_check()
215-
if dt is not None and dt < self.time_between_collection:
215+
if (dt is not None) and (dt < self.time_between_collection):
216216
self._processing_worker_queue.put_nowait(
217217
(worker, (submission_id, submission_name)))
218218
time.sleep(0)
@@ -231,20 +231,24 @@ def collect_result(self, session):
231231
else:
232232
self._logger.info(f'Collecting results from worker {worker}')
233233
returncode, stderr = worker.collect_results()
234+
234235
if returncode:
235236
if returncode == 124:
236237
self._logger.info(
237238
f'Worker {worker} killed due to timeout.'
238239
)
240+
submission_status = 'checking_error'
241+
elif returncode == 2:
242+
# Error occurred when downloading the logs
243+
submission_status = 'checking_error'
239244
else:
240245
self._logger.info(
241246
f'Worker {worker} killed due to an error '
242247
f'during training: {stderr}'
243248
)
244-
submission_status = 'training_error'
249+
submission_status = 'training_error'
245250
else:
246251
submission_status = 'tested'
247-
248252
set_submission_state(
249253
session, submission_id, submission_status
250254
)

0 commit comments

Comments
 (0)