ryanthompson591 commented on code in PR #21777:
URL: https://github.com/apache/beam/pull/21777#discussion_r894853598
##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -93,6 +95,100 @@ def batch_elements_kwargs(self) -> Mapping[str, Any]:
return {}
+class KeyedModelHandler(Generic[KeyT, ExampleT, PredictionT, ModelT],
Review Comment:
I wonder if there's any way to make this more readable or simple. All these
nested lists are making my eyes a little buggy.
Can we perhaps use constants here?
BASIC_MODEL_HANDLER = ModelHandler[Tuple[KeyT, ExampleT]
KEYED_PREDICTION = Tuple[KeyT, PredictionT]
Or are there any other ways to make some of this templating go away?
--
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]