Skip to content

Conversation

@lw
Copy link
Contributor

@lw lw commented Sep 21, 2020

Stack from ghstack:

To preserve backwards compatibility with applications that were passing in some ProcessGroupRpcBackendOptions but were not explicitly setting backend=BackendType.PROCESS_GROUP, we're here now inferring the backend type from the options if only the latter ones are passed. If neither are passed, we'll default to TensorPipe, as before this change.

Differential Revision: D23814289

To preserve backwards compatibility with applications that were passing in some ProcessGroupRpcBackendOptions but were not explicitly setting backend=BackendType.PROCESS_GROUP, we're here now inferring the backend type from the options if only the latter ones are passed. If neither are passed, we'll default to TensorPipe, as before this change.

Differential Revision: [D23814289](https://our.internmc.facebook.com/intern/diff/D23814289/)

[ghstack-poisoned]
lw added a commit that referenced this pull request Sep 21, 2020
To preserve backwards compatibility with applications that were passing in some ProcessGroupRpcBackendOptions but were not explicitly setting backend=BackendType.PROCESS_GROUP, we're here now inferring the backend type from the options if only the latter ones are passed. If neither are passed, we'll default to TensorPipe, as before this change.

Differential Revision: [D23814289](https://our.internmc.facebook.com/intern/diff/D23814289/)

ghstack-source-id: 112484729
Pull Request resolved: #45065
Comment on lines +101 to +104
f"RPC was initialized with no explicit backend but with options "
f"corresponding to {backend}, hence that backend will be used "
f"instead of the default {BackendType.TENSORPIPE}. To silence this "
f"warning pass `backend={backend}` explicitly."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add a deprecation warning about ProcessGroup since our long-term plan is to remove it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be good to add a deprecation warning too.

@dr-ci
Copy link

dr-ci bot commented Sep 21, 2020

💊 CI failures summary and remediations

As of commit f3c1fcf (more details on the Dr. CI page):


  • 2/2 failures possibly* introduced in this PR
    • 2/2 non-CircleCI failure(s)

Extra GitHub checks: 1 failed


codecov.io: 1 failed


This 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.

See how this bot performed.

This comment has been revised 11 times.

@codecov
Copy link

codecov bot commented Sep 21, 2020

Codecov Report

Merging #45065 into gh/lw/76/base will decrease coverage by 0.05%.
The diff coverage is 21.31%.

Impacted file tree graph

@@                Coverage Diff                @@
##           gh/lw/76/base   #45065      +/-   ##
=================================================
- Coverage          67.83%   67.78%   -0.06%     
=================================================
  Files                384      384              
  Lines              50047    50106      +59     
=================================================
+ Hits               33950    33962      +12     
- Misses             16097    16144      +47     
Impacted Files Coverage Δ
torch/distributed/rpc/backend_registry.py 32.35% <0.00%> (-1.67%) ⬇️
torch/distributed/rpc/__init__.py 36.92% <15.00%> (-9.89%) ⬇️
...orch/testing/_internal/distributed/rpc/rpc_test.py 25.70% <27.77%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71aeb84...f3c1fcf. Read the comment docs.

Comment on lines +101 to +104
f"RPC was initialized with no explicit backend but with options "
f"corresponding to {backend}, hence that backend will be used "
f"instead of the default {BackendType.TENSORPIPE}. To silence this "
f"warning pass `backend={backend}` explicitly."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be good to add a deprecation warning too.

if backend is None:
backend = BackendType.TENSORPIPE

if rpc_backend_options is None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if backend is specified as TensorPipe but backend options are ProcessGroupOptions? Do we raise an appropriate error? If so, can we have a unit test that verifies this?

Comment on lines +93 to +94
backend = candidate_backend
break
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these codecov warnings false positives? It does seem like your test should cover this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's unclear. I'm assuming that the coverage is collected from this job: https://app.circleci.com/pipelines/github/pytorch/pytorch/217281/workflows/3cfc25f2-225c-4be1-9ad5-a7942dc829e7/jobs/7659664 (since it's the only one with coverage in the name). And I checked the logs and the tests are run.

One option is that the odd on-the-fly class construction trick we're doing to assemble the RPC test suites makes it hard for the coverage tool to map the test back to its original lines.

Or I misunderstood how this works.

backend = candidate_backend
break
else:
raise TypeError(
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 add a test covering this?

To preserve backwards compatibility with applications that were passing in some ProcessGroupRpcBackendOptions but were not explicitly setting backend=BackendType.PROCESS_GROUP, we're here now inferring the backend type from the options if only the latter ones are passed. If neither are passed, we'll default to TensorPipe, as before this change.

Differential Revision: [D23814289](https://our.internmc.facebook.com/intern/diff/D23814289/)

[ghstack-poisoned]
lw added a commit that referenced this pull request Sep 22, 2020
Pull Request resolved: #45065

To preserve backwards compatibility with applications that were passing in some ProcessGroupRpcBackendOptions but were not explicitly setting backend=BackendType.PROCESS_GROUP, we're here now inferring the backend type from the options if only the latter ones are passed. If neither are passed, we'll default to TensorPipe, as before this change.
ghstack-source-id: 112582130

Differential Revision: [D23814289](https://our.internmc.facebook.com/intern/diff/D23814289/)
To preserve backwards compatibility with applications that were passing in some ProcessGroupRpcBackendOptions but were not explicitly setting backend=BackendType.PROCESS_GROUP, we're here now inferring the backend type from the options if only the latter ones are passed. If neither are passed, we'll default to TensorPipe, as before this change.

Differential Revision: [D23814289](https://our.internmc.facebook.com/intern/diff/D23814289/)

[ghstack-poisoned]
lw added a commit that referenced this pull request Sep 22, 2020
Pull Request resolved: #45065

To preserve backwards compatibility with applications that were passing in some ProcessGroupRpcBackendOptions but were not explicitly setting backend=BackendType.PROCESS_GROUP, we're here now inferring the backend type from the options if only the latter ones are passed. If neither are passed, we'll default to TensorPipe, as before this change.
ghstack-source-id: 112586258

Differential Revision: [D23814289](https://our.internmc.facebook.com/intern/diff/D23814289/)
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 76dc50e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants