damccorm commented on code in PR #25200:
URL: https://github.com/apache/beam/pull/25200#discussion_r1090759163
##########
sdks/python/apache_beam/pipeline.py:
##########
@@ -525,6 +525,14 @@ def run(self, test_runner_api='AUTO'):
self.contains_external_transforms = (
ExternalTransformFinder.contains_external_transforms(self))
+ self.contains_run_inference_transform = (
+ RunInferenceSideInputFinder.contains_run_inference_transform(self))
+
+ if (self.contains_run_inference_transform and
+ not self._options.view_as(StandardOptions).streaming):
+ raise RuntimeError(
+ "SideInputs to RunInference PTransform is only supported "
+ "in streaming mode.")
Review Comment:
```suggestion
"in streaming mode. To run in streaming mode, add the --streaming
pipeline option.")
```
(may need reformatted to pass precommits)
##########
sdks/python/apache_beam/pipeline.py:
##########
@@ -525,6 +525,14 @@ def run(self, test_runner_api='AUTO'):
self.contains_external_transforms = (
ExternalTransformFinder.contains_external_transforms(self))
+ self.contains_run_inference_transform = (
+ RunInferenceSideInputFinder.contains_run_inference_transform(self))
+
+ if (self.contains_run_inference_transform and
+ not self._options.view_as(StandardOptions).streaming):
+ raise RuntimeError(
Review Comment:
Could we please add a test to validate this gets correctly thrown?
--
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]