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 18:11:00 UTC

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

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


##########
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:
   Yep. Done.



##########
sdks/python/apache_beam/ml/inference/sklearn_inference_test.py:
##########
@@ -71,7 +70,7 @@ def tearDown(self):
 
   def test_predict_output(self):
     fake_model = FakeModel()
-    inference_runner = SklearnInferenceRunner()
+    inference_runner = SklearnModelHandler('unused')

Review Comment:
   Done.



##########
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:
   Done.



-- 
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