Skip to content

Conversation

@rohan-varma
Copy link
Contributor

@rohan-varma rohan-varma commented Nov 18, 2019

Stack from ghstack:

Renames this API to wait_all_workers as discussed.

Differential Revision: D18581466

rohan-varma added a commit that referenced this pull request Nov 18, 2019
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():
Copy link
Contributor Author

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?

def join_rpc():
def wait_all_workers():
r"""
Block until all local and remote RPC processes reach this method, process
Copy link
Contributor

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.

Copy link
Contributor Author

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]
@rohan-varma
Copy link
Contributor Author

@pritamdamania87 updated to include the changes to documentation, as well as adding a small example. Did not include shutdown since that PR has not landed.

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]
rohan-varma added a commit that referenced this pull request Nov 19, 2019
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/)
rohan-varma added a commit that referenced this pull request Nov 19, 2019
…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]
@mrshenli
Copy link
Contributor

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]
rohan-varma added a commit that referenced this pull request Nov 20, 2019
…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]
rohan-varma added a commit that referenced this pull request Nov 20, 2019
…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]
rohan-varma added a commit that referenced this pull request Nov 20, 2019
…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]
rohan-varma added a commit that referenced this pull request Nov 20, 2019
…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]
@rohan-varma
Copy link
Contributor Author

CI errors are unrelated, landing this.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in f304bd5.

@facebook-github-bot facebook-github-bot deleted the gh/rohan-varma/35/head branch November 24, 2019 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants