TheNeuralBit commented on code in PR #21806:
URL: https://github.com/apache/beam/pull/21806#discussion_r897092888
##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -125,11 +130,14 @@ def load_model(self) -> ModelT:
return self._unkeyed.load_model()
def run_inference(
- self, batch: Sequence[Tuple[KeyT, ExampleT]], model: ModelT,
- **kwargs) -> Iterable[Tuple[KeyT, PredictionT]]:
+ self,
+ batch: Sequence[Tuple[KeyT, ExampleT]],
+ model: ModelT,
+ extra_kwargs: Optional[Dict[str, Any]] = None
+ ) -> Iterable[Tuple[KeyT, PredictionT]]:
keys, unkeyed_batch = zip(*batch)
return zip(
- keys, self._unkeyed.run_inference(unkeyed_batch, model, **kwargs))
+ keys, self._unkeyed.run_inference(unkeyed_batch, model, extra_kwargs))
Review Comment:
But the fact is the interface _has_ grown, extra_kwargs is an argument on
`ModelHandler.run_inference`.
--
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]