This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new d3b1312e882 Fix pre/postprocess type hints (#34298)
d3b1312e882 is described below
commit d3b1312e8829213a2850010b7c8c3fe09e3e4698
Author: Danny McCormick <[email protected]>
AuthorDate: Fri Mar 14 17:03:21 2025 -0400
Fix pre/postprocess type hints (#34298)
---
sdks/python/apache_beam/ml/inference/base.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sdks/python/apache_beam/ml/inference/base.py
b/sdks/python/apache_beam/ml/inference/base.py
index 5cc38cd842c..e4c3e4cab5e 100644
--- a/sdks/python/apache_beam/ml/inference/base.py
+++ b/sdks/python/apache_beam/ml/inference/base.py
@@ -272,7 +272,7 @@ class ModelHandler(Generic[ExampleT, PredictionT, ModelT]):
def with_preprocess_fn(
self, fn: Callable[[PreProcessT], ExampleT]
- ) -> 'ModelHandler[PreProcessT, PredictionT, ModelT, PreProcessT]':
+ ) -> 'ModelHandler[PreProcessT, PredictionT, ModelT]':
"""Returns a new ModelHandler with a preprocessing function
associated with it. The preprocessing function will be run
before batching/inference and should map your input PCollection
@@ -283,7 +283,7 @@ class ModelHandler(Generic[ExampleT, PredictionT, ModelT]):
def with_postprocess_fn(
self, fn: Callable[[PredictionT], PostProcessT]
- ) -> 'ModelHandler[ExampleT, PostProcessT, ModelT, PostProcessT]':
+ ) -> 'ModelHandler[ExampleT, PostProcessT, ModelT]':
"""Returns a new ModelHandler with a postprocessing function
associated with it. The postprocessing function will be run
after inference and should map the base ModelHandler's output