Merge ModelLoader and InferenceRunner into same class.#21795
Merge ModelLoader and InferenceRunner into same class.#21795robertwb merged 8 commits intoapache:masterfrom
Conversation
|
R: @yeandy , @ryanthompson591 or @TheNeuralBit |
| 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.""" |
There was a problem hiding this comment.
Maybe update this docstring?
There was a problem hiding this comment.
Similarly for the implementations, consider if the the docstrings need to be merged.
| 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.""" |
There was a problem hiding this comment.
Has the abiltity to load ML models and run inferences on that model.
| @@ -26,8 +26,7 @@ | |||
|
|
|||
There was a problem hiding this comment.
Might have to merge this file since I just merged a change. Should be straight forward.
| def test_predict_output(self): | ||
| fake_model = FakeModel() | ||
| inference_runner = SklearnInferenceRunner() | ||
| inference_runner = SklearnModelHandler('unused') |
There was a problem hiding this comment.
SklearnModelHandler(uri='unused')?
Co-authored-by: Andy Ye <andyye333@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #21795 +/- ##
==========================================
+ Coverage 74.01% 74.05% +0.03%
==========================================
Files 698 698
Lines 92224 92330 +106
==========================================
+ Hits 68263 68377 +114
+ Misses 22710 22702 -8
Partials 1251 1251
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Run PythonLint PreCommit |
|
Seems Unit tests are brocken: |
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.