ryanthompson591 commented on code in PR #17448:
URL: https://github.com/apache/beam/pull/17448#discussion_r863181718


##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -83,14 +84,29 @@ def get_inference_runner(self) -> InferenceRunner:
 
 
 class RunInference(beam.PTransform):
-  """An extensible transform for running inferences."""
-  def __init__(self, model_loader: ModelLoader, clock=None):
+  """An extensible transform for running inferences.
+  Args:
+      model_loader: An implementation of InferenceRunner.
+      clock: A clock implementing get_current_time_in_microseconds.
+      close_to_resource: A string representing the resource location hints.
+  """
+  def __init__(self,
+               model_loader: ModelLoader,
+               clock:_Clock=None,
+               close_to_resource:str=None):
     self._model_loader = model_loader
     self._clock = clock
+    self._close_to_resource = close_to_resource

Review Comment:
   That actually makes a lot of sense and I think it will work.
   
   In the TFX-BSL implementation, the data does come from the input paramter 
which the loader has access to.
   
https://github.com/tensorflow/tfx-bsl/blob/182918aaefd5287e7669d87bfc818155470315aa/tfx_bsl/beam/run_inference.py#L118



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