BjornPrime commented on code in PR #23830:
URL: https://github.com/apache/beam/pull/23830#discussion_r1004896485


##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -426,17 +427,22 @@ def setup(self):
 
   def process(self, batch, inference_args):
     start_time = _to_microseconds(self._clock.time_ns())
-    result_generator = self._model_handler.run_inference(
+    try:
+      result_generator = self._model_handler.run_inference(
         batch, self._model, inference_args)
-    predictions = list(result_generator)
+    except BaseException:
+      self._metrics_collector.failed_batches_counter.inc()
+      raise
+    else:

Review Comment:
   So when the exception is raised, that stops the method from executing 
further?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to