robertwb commented on code in PR #17762:
URL: https://github.com/apache/beam/pull/17762#discussion_r883005813
##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -153,14 +160,12 @@ def update(
self._inference_request_batch_byte_size.update(examples_byte_size)
-class _RunInferenceDoFn(beam.DoFn):
+class _RunInferenceDoFn(beam.DoFn, Generic[ExampleT, PredictionT]):
"""A DoFn implementation generic to frameworks."""
- def __init__(self, model_loader: ModelLoader, clock=None):
+ def __init__(
+ self, model_loader: ModelLoader[ExampleT, PredictionT, Any], clock=None):
Review Comment:
This class imposes no constraints in the model type and doesn't use it in
any way.
--
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]