yeandy commented on code in PR #17470:
URL: https://github.com/apache/beam/pull/17470#discussion_r878372115


##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -96,7 +107,9 @@ def expand(self, pcoll: beam.PCollection) -> 
beam.PCollection:
         pcoll
         # TODO(BEAM-14044): Hook into the batching DoFn APIs.
         | beam.BatchElements()
-        | beam.ParDo(_RunInferenceDoFn(self._model_loader, self._clock)))
+        | beam.ParDo(
+            _RunInferenceDoFn(
+                self._model_loader, self._prediction_params, self._clock)))

Review Comment:
   Thanks for the clarification Brian. 
   
   It may be the case that these extra `prediction_params` need to be 
determined at runtime (not hard-coded) based on, for example, the shape of the 
input data. So I think we'd want to modify base.. I'm going to do a few quick 
tests right now to see the flow of passing in `prediction_params` as a 
PCollection.



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