yeandy commented on code in PR #21806:
URL: https://github.com/apache/beam/pull/21806#discussion_r897120580
##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -84,8 +86,11 @@ def load_model(self) -> ModelT:
"""Loads and initializes a model for processing."""
raise NotImplementedError(type(self))
- def run_inference(self, batch: Sequence[ExampleT], model: ModelT,
- **kwargs) -> Iterable[PredictionT]:
+ def run_inference(
+ self,
+ batch: Sequence[ExampleT],
+ model: ModelT,
+ extra_kwargs: Optional[Dict[str, Any]] = None) -> Iterable[PredictionT]:
Review Comment:
Changed to `inference_args` for conciseness.
##########
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:
Good point. Removed.
--
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]