You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ro...@apache.org on 2022/06/10 19:51:49 UTC
[beam] branch master updated: fixup: bug
This is an automated email from the ASF dual-hosted git repository.
robertwb 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 8c3d322e736 fixup: bug
new ef7cd0c4889 Merge pull request #21805 from AnandInguva/sklearn-tests-bug
8c3d322e736 is described below
commit 8c3d322e736c418e08619b69c089dd300971987f
Author: Anand Inguva <an...@gmail.com>
AuthorDate: Fri Jun 10 15:47:47 2022 -0400
fixup: bug
---
sdks/python/apache_beam/ml/inference/sklearn_inference_test.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sdks/python/apache_beam/ml/inference/sklearn_inference_test.py b/sdks/python/apache_beam/ml/inference/sklearn_inference_test.py
index e23acf4ab41..91eb86e2de4 100644
--- a/sdks/python/apache_beam/ml/inference/sklearn_inference_test.py
+++ b/sdks/python/apache_beam/ml/inference/sklearn_inference_test.py
@@ -240,7 +240,7 @@ class SkLearnRunInferenceTest(unittest.TestCase):
splits = [dataframe.loc[[i]] for i in dataframe.index]
pcoll = pipeline | 'start' >> beam.Create(splits)
actual = pcoll | api.RunInference(
- SklearnModelLoader(model_uri=temp_file_name))
+ SklearnModelHandler(model_uri=temp_file_name))
expected = [
api.PredictionResult(splits[0], 5),
@@ -265,7 +265,7 @@ class SkLearnRunInferenceTest(unittest.TestCase):
pcoll = pipeline | 'start' >> beam.Create(keyed_rows)
actual = pcoll | api.RunInference(
- SklearnModelLoader(model_uri=temp_file_name))
+ SklearnModelHandler(model_uri=temp_file_name))
expected = [
('0', api.PredictionResult(splits[0], 5)),
('1', api.PredictionResult(splits[1], 8)),
@@ -279,14 +279,14 @@ class SkLearnRunInferenceTest(unittest.TestCase):
def test_infer_invalid_data_type(self):
with self.assertRaises(ValueError):
unexpected_input_type = [[1, 2, 3, 4], [5, 6, 7, 8]]
- inference_runner = SklearnModelLoader(model_uri=unused)
+ inference_runner = SklearnModelHandler(model_uri='unused')
fake_model = FakeModel()
inference_runner.run_inference(unexpected_input_type, fake_model)
def test_infer_too_many_rows_in_dataframe(self):
with self.assertRaises(ValueError):
data_frame_too_many_rows = pandas_dataframe()
- inference_runner = SklearnModelLoader(model_uri=unused)
+ inference_runner = SklearnModelHandler(model_uri='unused')
fake_model = FakeModel()
inference_runner.run_inference([data_frame_too_many_rows], fake_model)