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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]