tvalentyn commented on code in PR #22088:
URL: https://github.com/apache/beam/pull/22088#discussion_r937037342
##########
sdks/python/apache_beam/ml/inference/sklearn_inference_it_test.py:
##########
@@ -70,6 +78,27 @@ def test_sklearn_mnist_classification(self):
true_label, expected_prediction = expected_outputs[i].split(',')
self.assertEqual(predictions_dict[true_label], expected_prediction)
+ def test_sklearn_regression(self):
+ test_pipeline = TestPipeline(is_integration_test=True)
+ input_file =
'gs://apache-beam-ml/testing/inputs/japanese_housing_test_data.csv' # pylint:
disable=line-too-long
+ output_file_dir = 'gs://temp-storage-for-end-to-end-tests'
+ output_file = '/'.join([output_file_dir, str(uuid.uuid4()), 'result.txt'])
+ model_path = 'gs://apache-beam-ml/models/japanese_housing/'
+ extra_opts = {
+ 'input': input_file,
+ 'output': output_file,
+ 'model_path': model_path,
+ }
+ sklearn_japanese_housing_regression.run(
+ test_pipeline.get_full_options_as_args(**extra_opts),
+ save_main_session=False)
+ self.assertEqual(FileSystems().exists(output_file), True)
+
+ expected_output_filepath =
'gs://apache-beam-ml/testing/expected_outputs/japanese_housing_subset.txt' #
pylint: disable=line-too-long
+ expected = file_lines_sorted(expected_output_filepath)
+ actual = file_lines_sorted(output_file)
+ self.assertListEqual(expected, actual)
Review Comment:
not sure, will trust your judgement here.
--
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]