You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/15 15:29:31 UTC

[GitHub] [beam] tvalentyn commented on a diff in pull request #21806: Remove kwargs and add explicit runinference_args

tvalentyn commented on code in PR #21806:
URL: https://github.com/apache/beam/pull/21806#discussion_r898128282


##########
sdks/python/apache_beam/ml/inference/sklearn_inference.py:
##########
@@ -74,8 +91,12 @@ def load_model(self) -> BaseEstimator:
     return _load_model(self._model_uri, self._model_file_type)
 
   def run_inference(
-      self, batch: Sequence[numpy.ndarray], model: BaseEstimator,
-      **kwargs) -> Iterable[PredictionResult]:
+      self,
+      batch: Sequence[numpy.ndarray],
+      model: BaseEstimator,
+      inference_args: Optional[Dict[str, Any]] = None
+  ) -> Iterable[PredictionResult]:
+    _validate_inference_args(inference_args)

Review Comment:
   (not urgent). This validation will  happen at pipeline execution, right? Can it be done at construction time to reduce the feedback loop?



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org