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


##########
sdks/python/apache_beam/ml/inference/sklearn_inference.py:
##########
@@ -74,8 +77,11 @@ 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,
+      extra_kwargs: Optional[Dict[str,

Review Comment:
   > If someone puts extra args into this interface that it isn't expecting it 
should fail instead of work silently.
   
   A ModelHandler that doesn't support extra_kwargs could raise an error. We 
don't need to rely on Python argument matching to raise the error.



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