You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/10 17:38:56 UTC

[GitHub] [beam] TheNeuralBit commented on a diff in pull request #21795: Merge ModelLoader and InferenceRunner into same class.

TheNeuralBit commented on code in PR #21795:
URL: https://github.com/apache/beam/pull/21795#discussion_r894763475


##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -64,8 +64,12 @@ def _to_microseconds(time_ns: int) -> int:
   return int(time_ns / _NANOSECOND_TO_MICROSECOND)
 
 
-class InferenceRunner(Generic[ExampleT, PredictionT, ModelT]):
-  """Implements running inferences for a framework."""
+class ModelHandler(Generic[ExampleT, PredictionT, ModelT]):
+  """Has the ability to load an ML model."""

Review Comment:
   Maybe update this docstring?



##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -64,8 +64,12 @@ def _to_microseconds(time_ns: int) -> int:
   return int(time_ns / _NANOSECOND_TO_MICROSECOND)
 
 
-class InferenceRunner(Generic[ExampleT, PredictionT, ModelT]):
-  """Implements running inferences for a framework."""
+class ModelHandler(Generic[ExampleT, PredictionT, ModelT]):
+  """Has the ability to load an ML model."""

Review Comment:
   Similarly for the implementations, consider if the the docstrings need to be merged.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org