damccorm commented on code in PR #25200:
URL: https://github.com/apache/beam/pull/25200#discussion_r1093614866


##########
sdks/python/apache_beam/pipeline.py:
##########
@@ -525,6 +525,31 @@ def run(self, test_runner_api='AUTO'):
     self.contains_external_transforms = (
         ExternalTransformFinder.contains_external_transforms(self))
 
+    # Finds if RunInference has side inputs enables.
+    # also, checks for the side input window is global and has non default
+    # triggers.
+    run_inference_visitor = RunInferenceVisitor().visit_run_inference(self)
+    self._run_inference_contains_side_input = (
+        run_inference_visitor.contains_run_inference_side_inputs)
+
+    self.run_inference_global_window_non_default_trigger = (
+        run_inference_visitor.contains_global_windows_non_default_trigger)
+
+    if (self._run_inference_contains_side_input and
+        not self._options.view_as(StandardOptions).streaming):
+      raise RuntimeError(
+          "SideInputs to RunInference PTransform is only supported "

Review Comment:
   > Filed https://github.com/apache/beam/issues/25264 ;
   
   Thanks
   
   > None of the models (or records) are "first" and if anything there is 
ambiguity which model should be used.
   
   I meant first by timestamp. For the model at least (if not the main input), 
I think this is a reasonable understanding of how the non-Beam person will see 
the world.
   
   > Now if the model (and records) are appropriately timestamped (this works 
in batch), they'll all get the "right" model.
   
   I didn't think this was the case, and it alleviates my concerns here.
   
   > If using an unbounded side input causes hangs, yes, let's warn on that 
(ideally as high a level as makes sense, it's not a RunInference-specific 
issue) until this is fixed. But I'd rather not prohibit side inputs altogether.
   
   I'm fine with this if Anand is.



-- 
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