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 documentation for torch.overrides submodule. #48170
Conversation
709ebab
to
bea7aa0
Compare
💊 CI failures summary and remediationsAs of commit 32eed06 (more details on the Dr. CI page):
Extra GitHub checks: 1 failed
ci.pytorch.org: 1 failedThis 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 on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 21 times. |
@ezyang Now that these things are being documented, it's our last chance to make anything private. So let me know if you'd make anything else private. |
bea7aa0
to
942f2e8
Compare
I looked over all the funcs, and I agree with your assessment of what should be public and private. |
0fff1a8
to
cde78b1
Compare
@@ -605,14 +607,14 @@ provides a developer-facing API for ensuring full support for | |||
changes without warning in the future. | |||
|
|||
First, to get a listing of all overridable functions, use | |||
``torch.overrides.get_overridable_functions``. This returns a dictionary whose | |||
``torch.overrides._get_overridable_functions``. This returns a dictionary whose |
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.
Ooh... I forgot that you refer to this explicitly in the docs. Referencing a private function here is kind of weird. Perhaps that means this particular function should be kept public. _get_testing_overrides
and _get_ignored_functions
are the ones that definitely should not be public.
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.
Version 1.7 is the only version where these were public. Before that, the submodule was private. v1.7.1 is the only version where the docs might show it as public.
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.
Sorry, it doesn't have to do with the historical context is. What I mean is, it's weird to mark a function with a leading underscore, and then immediately turn around and in the docs say, "Hey, you should call this private function to find out what functions to implement it with!" It's like saying, "This thing, which you're not supposed to use, is so useful that we are going to tell you about it in the public documentation hint hint wink wink"
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'll make these public.
Codecov Report
@@ Coverage Diff @@
## master #48170 +/- ##
==========================================
- Coverage 81.31% 81.31% -0.01%
==========================================
Files 1839 1839
Lines 198692 198703 +11
==========================================
+ Hits 161561 161569 +8
- Misses 37131 37134 +3 |
be99154
to
32eed06
Compare
The CI failures are all unrelated.
|
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.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Fixes #48087