Commit 26a01773 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Merge branch 'streamline_algorithm_process_error_handling' into 'master'

Handle error the same way for all algorithm types on execution

Closes beat.core#98

See merge request !75
parents a22c8063 d7207172
Pipeline #40749 passed with stages
in 6 minutes and 32 seconds
...@@ -222,9 +222,6 @@ class AlgorithmExecutor(object): ...@@ -222,9 +222,6 @@ class AlgorithmExecutor(object):
loop_channel=self.loop_channel, loop_channel=self.loop_channel,
) )
if not result:
return False
else: else:
if self.algorithm.type == Algorithm.LEGACY: if self.algorithm.type == Algorithm.LEGACY:
logger.warning( logger.warning(
...@@ -260,23 +257,22 @@ class AlgorithmExecutor(object): ...@@ -260,23 +257,22 @@ class AlgorithmExecutor(object):
output=self.output_list[0], output=self.output_list[0],
) )
else: else:
try: result = self.runner.process(
result = self.runner.process( inputs=self.input_list,
inputs=self.input_list, data_loaders=self.data_loaders,
data_loaders=self.data_loaders, outputs=self.output_list,
outputs=self.output_list, loop_channel=self.loop_channel,
loop_channel=self.loop_channel, )
)
except Exception:
result = None
if not result: if not result:
self.done({}) break
return False
for output in self.output_list: for output in self.output_list:
output.close() output.close()
if not result:
return False
missing_data_outputs = [x for x in self.output_list if x.isDataMissing()] missing_data_outputs = [x for x in self.output_list if x.isDataMissing()]
if missing_data_outputs: if missing_data_outputs:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment