-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[rpc] polish examples in docstrings and update docs to reflect correct use of rpc.init_rpc #30052
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
…t use of rpc.init_rpc Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/) [ghstack-poisoned]
…t use of rpc.init_rpc Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/) ghstack-source-id: 94155096 Pull Request resolved: #30052
docs/source/rpc.rst
Outdated
| and distributed autograd. As part of this, it will also initialize a default | ||
| `ProcessGroup` `backend | ||
| <https://pytorch.org/docs/stable/distributed.html#torch.distributed.Backend>`_ | ||
| that uses gloo for collective communication. |
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.
Basically, I'm trying to express that init_rpc runs dist.init_process_group(backend=GLOO) behind the scenes, is there a better way to write this?
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.
Rewrite this as follows to make it clear that the default is ProcessGroup but other backends be available:
By default, this will initialize the `ProcessGroup` backend. The `ProcessGroup` backend internally uses gloo for communication
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.
Looks good, although please address the comments before landing.
docs/source/rpc.rst
Outdated
| and distributed autograd. As part of this, it will also initialize a default | ||
| `ProcessGroup` `backend | ||
| <https://pytorch.org/docs/stable/distributed.html#torch.distributed.Backend>`_ | ||
| that uses gloo for collective communication. |
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.
Rewrite this as follows to make it clear that the default is ProcessGroup but other backends be available:
By default, this will initialize the `ProcessGroup` backend. The `ProcessGroup` backend internally uses gloo for communication
docs/source/rpc.rst
Outdated
| and distributed autograd. | ||
| and distributed autograd. As part of this, it will also initialize a default | ||
| `ProcessGroup` `backend | ||
| <https://pytorch.org/docs/stable/distributed.html#torch.distributed.Backend>`_ |
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.
Use :ref: for this link instead of the full path.
…lect correct use of rpc.init_rpc" rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/) [ghstack-poisoned]
…t use of rpc.init_rpc Pull Request resolved: #30052 Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. ghstack-source-id: 94200238 Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/)
…lect correct use of rpc.init_rpc" rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/) [ghstack-poisoned]
…t use of rpc.init_rpc Pull Request resolved: #30052 Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. ghstack-source-id: 94247167 Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/)
…lect correct use of rpc.init_rpc" rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/) [ghstack-poisoned]
…lect correct use of rpc.init_rpc" rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/) [ghstack-poisoned]
…t use of rpc.init_rpc Pull Request resolved: #30052 Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. ghstack-source-id: 94256844 Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/)
…lect correct use of rpc.init_rpc" rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc** * #30050 [rpc] rename join_rpc to wait_all_workers in public api rpc.init_rpc Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/) [ghstack-poisoned]
…t use of rpc.init_rpc Pull Request resolved: #30052 Some of the examples provided in `rpc/api.py` were not updated along with the code changes, this PR updates them. Also removes the `dist.ProcessGroup` information since `init_rpc` now initializes a default process group. ghstack-source-id: 94273004 Differential Revision: [D18582596](https://our.internmc.facebook.com/intern/diff/D18582596/)
Stack from ghstack:
Some of the examples provided in
rpc/api.pywere not updated alongwith the code changes, this PR updates them. Also removes the
dist.ProcessGroupinformation sinceinit_rpcnow initializes a defaultprocess group.
Differential Revision: D18582596