-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support models returning a dictionary of outputs #23087
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23087 +/- ##
==========================================
- Coverage 73.58% 73.58% -0.01%
==========================================
Files 716 716
Lines 95301 95309 +8
==========================================
+ Hits 70127 70131 +4
- Misses 23878 23882 +4
Partials 1296 1296
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
R: @yeandy I ended up picking this one up as a good ramp up item, lmk if you think there's a better approach here though. |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks good! A few comments; and can you please add a test for SklearnModelHandlerPandas
?
Let's also run postcommit to ensure the |
Run Python 3.8 PostCommit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Good catch - was an oversight on my part. Thanks for the feedback, I think I've responded to everything at this point! |
Run Python 3.8 PostCommit |
The inference IT tests are enabled only on Python 3.7 and Python 3.9 post commit suites. (lowest and highest version) |
Oh good to know - it looks like that is passing anyways with this change fortunately - https://ci-beam.apache.org/job/beam_PostCommit_Python37/5697/ |
Sorry about misleading you with the 3.8 run. I always get confused which tests are enabled for which suites. |
* Support models returning a dictionary of outputs * Update example with this issue * Format * linting * Feedback * keys for clarity
* Support models returning a dictionary of outputs * Update example with this issue * Format * linting * Feedback * keys for clarity
* Support models returning a dictionary of outputs * Update example with this issue * Format * linting * Feedback * keys for clarity
The return value of the
forward
call for many models is a dictionary with the predictions along with more metadata. This supports that return type.Fixes #22240
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with 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.