Guard against negative rpcTimeout being passed in to RpcBackendOptions#38267
Closed
osalpekar wants to merge 3 commits intogh/osalpekar/25/basefrom
Closed
Guard against negative rpcTimeout being passed in to RpcBackendOptions#38267osalpekar wants to merge 3 commits intogh/osalpekar/25/basefrom
osalpekar wants to merge 3 commits intogh/osalpekar/25/basefrom
Conversation
Assert that the rpcTimeout is non-negative in RpcBackendOptions constructor Differential Revision: [D21509850](https://our.internmc.facebook.com/intern/diff/D21509850/) [ghstack-poisoned]
…ckendOptions" Assert that the rpcTimeout is positive in RpcBackendOptions constructor Differential Revision: [D21509850](https://our.internmc.facebook.com/intern/diff/D21509850/) [ghstack-poisoned]
osalpekar
added a commit
that referenced
this pull request
May 11, 2020
Pull Request resolved: #38267 Assert that the rpcTimeout is positive in RpcBackendOptions constructor ghstack-source-id: 103874171 Differential Revision: [D21509850](https://our.internmc.facebook.com/intern/diff/D21509850/)
💊 CI failures summary and remediationsAs of commit a108cad (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis 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. This comment has been revised 5 times. |
mrshenli
reviewed
May 12, 2020
| : rpcTimeoutSeconds(rpcTimeoutSeconds), | ||
| initMethod(std::move(initMethod)) {} | ||
| initMethod(std::move(initMethod)) { | ||
| TORCH_CHECK(rpcTimeoutSeconds > 0, "RPC Timeout must be greater than 0"); |
Contributor
There was a problem hiding this comment.
Do we accept 0 timeout as infinite timeout? The args doc in rpc_sync says:
timeout (float, optional): timeout in seconds to use for this RPC. If
the RPC does not complete in this amount of
time, an exception indicating it has
timed out will be raised. A value of 0
indicates an infinite timeout, i.e. a timeout
error will never be raised. If not provided,
the default value set during initialization
or with `_set_rpc_timeout` is used.
Contributor
Author
There was a problem hiding this comment.
Yes, looks like we should support 0 - will update
Contributor
|
Flake8 error has been fixed on master. A rebase should help get rid of the lint error. |
…ckendOptions" Assert that the rpcTimeout is positive in RpcBackendOptions constructor Differential Revision: [D21509850](https://our.internmc.facebook.com/intern/diff/D21509850/) [ghstack-poisoned]
osalpekar
added a commit
that referenced
this pull request
May 13, 2020
Pull Request resolved: #38267 Assert that the rpcTimeout is positive in RpcBackendOptions constructor ghstack-source-id: 104029918 Differential Revision: [D21509850](https://our.internmc.facebook.com/intern/diff/D21509850/)
mrshenli
approved these changes
May 14, 2020
Contributor
|
This pull request has been merged in b57a339. |
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
pytorch#38267) Summary: Pull Request resolved: pytorch#38267 Assert that the rpcTimeout is positive in RpcBackendOptions constructor ghstack-source-id: 104029918 Test Plan: CI Differential Revision: D21509850 fbshipit-source-id: c925490e3d8fa2ffa42b0ae1170ca2f740af11f7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Assert that the rpcTimeout is positive in RpcBackendOptions
constructor
Differential Revision: D21509850