-
Notifications
You must be signed in to change notification settings - Fork 4.5k
add __Init__ to inference. #17514
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
add __Init__ to inference. #17514
Conversation
|
Can one of the admins verify this patch? |
1 similar comment
|
Can one of the admins verify this patch? |
|
Run PythonDocs PreCommit |
21b3872 to
cbf07af
Compare
|
R: @tvalentyn |
Codecov Report
@@ Coverage Diff @@
## master #17514 +/- ##
========================================
Coverage 73.85% 73.85%
========================================
Files 690 691 +1
Lines 90843 91053 +210
========================================
+ Hits 67093 67251 +158
- Misses 22537 22589 +52
Partials 1213 1213
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| :param model_class: class of the Pytorch model that defines the model | ||
| structure. | ||
| :param device: the device on which you wish to run the model. If | ||
| ``device = GPU`` then device will be cuda if it is avaiable. Otherwise, |
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.
| ``device = GPU`` then device will be cuda if it is avaiable. Otherwise, | |
| ``device = GPU`` then a GPU device will be used if it is available. Otherwise, |
sdks/python/tox.ini
Outdated
| sphinx_rtd_theme==0.4.3 | ||
| docutils<0.18 | ||
| Jinja2==3.0.3 # TODO(BEAM-14172): Sphinx version is too old. | ||
| torch==1.9.0 |
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.
I don't think we should hardcode a particular version of torch, since Beam doesn't have a requirement on torch.
| structure. | ||
| :param device: the device on which you wish to run the model. If | ||
| ``device = GPU`` then device will be cuda if it is avaiable. Otherwise, | ||
| it will be cpu. |
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.
| it will be cpu. | |
| it will be CPU. |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # mypy: ignore-errors |
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.
Why is this necessary now?
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.
TypeVar should have a bounded source. Right now, we want to keep it generic as possible. So, only this file will be ignored for mypy for now and will circle back to this later.
Jira related to this: https://issues.apache.org/jira/browse/BEAM-14217
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.
Please add relevant comments to BEAM-14217 and consider adding a # TODO (BEAM-14217): ...
here if applicable at a later change.
|
also R: @yeandy |
|
PTAL @tvalentyn |
yeandy
left a comment
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
|
Run Python PreCommit |
Please add a meaningful description for your change here
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.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.