-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[rpc] rename join_rpc to wait_all_workers in public api #30050
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
Renames this API to wait_all_workers as discussed. Differential Revision: [D18581466](https://our.internmc.facebook.com/intern/diff/D18581466/) [ghstack-poisoned]
Renames this API to wait_all_workers as discussed. Differential Revision: [D18581466](https://our.internmc.facebook.com/intern/diff/D18581466/) ghstack-source-id: 94151171 Pull Request resolved: #30050
|
|
||
|
|
||
| def join_rpc(): | ||
| def wait_all_workers(): |
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.
calling it wait_all_workers as per discussion, though for 1.4, it will probably still join all threads, which is more of a shutdown operation (meaning that user can't keep sending rpcs after this). maybe join_all_workers is more appropriate?
torch/distributed/rpc/api.py
Outdated
| def join_rpc(): | ||
| def wait_all_workers(): | ||
| r""" | ||
| Block until all local and remote RPC processes reach this method, process |
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.
Can we expand the docstring here to clearly indicate that this method should be used as part of termination and there is no guarantee that the RPC framework will work after this method returns. Would be also helpful to have an example here of how to just wait_all_workers and shutdown together.
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.
shutdown has not been landed yet - if that lands first we can add this.
rpc.init_rpc * **#30050 [rpc] rename join_rpc to wait_all_workers in public api** Renames this API to wait_all_workers as discussed. Differential Revision: [D18581466](https://our.internmc.facebook.com/intern/diff/D18581466/) [ghstack-poisoned]
|
@pritamdamania87 updated to include the changes to documentation, as well as adding a small example. Did not include |
rpc.init_rpc * **#30050 [rpc] rename join_rpc to wait_all_workers in public api** Renames this API to wait_all_workers as discussed. Differential Revision: [D18581466](https://our.internmc.facebook.com/intern/diff/D18581466/) [ghstack-poisoned]
Pull Request resolved: #30050 Renames this API to wait_all_workers as discussed. ghstack-source-id: 94198512 Differential Revision: [D18581466](https://our.internmc.facebook.com/intern/diff/D18581466/)
…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]
|
cc @zzzwen @mingzhe09088 This API change might break your code. |
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** Renames this API to wait_all_workers as discussed. Differential Revision: [D18581466](https://our.internmc.facebook.com/intern/diff/D18581466/) [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 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]
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** Renames this API to wait_all_workers as discussed. Differential Revision: [D18581466](https://our.internmc.facebook.com/intern/diff/D18581466/) [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 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]
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** Renames this API to wait_all_workers as discussed. Differential Revision: [D18581466](https://our.internmc.facebook.com/intern/diff/D18581466/) [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** * #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]
|
CI errors are unrelated, landing this. |
|
This pull request has been merged in f304bd5. |
Stack from ghstack:
rpc.init_rpc
rpc.init_rpc
rpc.init_rpc
rpc.init_rpc
rpc.init_rpc
rpc.init_rpc
Renames this API to wait_all_workers as discussed.
Differential Revision: D18581466