-
Notifications
You must be signed in to change notification settings - Fork 23k
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 __ge__ to TorchVersion #64565
Add __ge__ to TorchVersion #64565
Conversation
This PR adds greater equal comparison so that not the base class's (str) comparison method is used. This is necessary for a correct comparison with a version string. Previously the following was the case: ```py >>> torch.__version__ '1.10.0.dev20210830+cpu' >>> torch.__version__>"1.9" True >>> torch.__version__>="1.9" False # Wrong output since the base class (str) was used for __ge__ comparison ```
Hi @Rikorose! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 6bf6c18 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #64565 +/- ##
==========================================
+ Coverage 66.64% 66.72% +0.07%
==========================================
Files 707 707
Lines 92346 92351 +5
==========================================
+ Hits 61546 61619 +73
+ Misses 30800 30732 -68 |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
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.
Thanks for contributing!
@mrshenli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
This PR adds greater equal comparison so that not the base class's (str) comparison method is used.
This is necessary for a correct comparison with a version string.
Previously the following was the case: