-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Stop showing .api as an API path component in RPC docs #30160
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
Conversation
[ghstack-poisoned]
The path torch.distributed.rpc.api is an implementation detail, which should not be used by applications to import RPC APIs. Instead, all RPC APIs are exposed directly as torch.distributed.rpc.*. This commit makes the API doc consistent with the above expectation. Differential Revision: [D18616359](https://our.internmc.facebook.com/intern/diff/D18616359) [ghstack-poisoned]
rohan-varma
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.
Thanks for doing this!
|
|
||
| .. automodule:: torch.distributed.rpc.api | ||
| :members: | ||
| .. automodule:: torch.distributed.rpc |
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 was trying to do something similar when working on the first version of this docs, but the downside with this approach is that if we add a new function, we'd have to manually remember to add to the doc here. Not sure how to get around that.
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 agree, that is indeed a problem for this approach, and we can figure out how to solve it later (Maybe remove api.py and move everything to __init__.py). As for now, let's make sure the doc exposes the correct path.

Stack from ghstack:
The path torch.distributed.rpc.api is an implementation detail, which
should not be used by applications to import RPC APIs. Instead, all
RPC APIs are exposed directly as torch.distributed.rpc.*. This
commit makes the API doc consistent with the above expectation.
closes #30014
Differential Revision: D18616359