Skip to content

Guard against negative rpcTimeout being passed in to RpcBackendOptions#38267

Closed
osalpekar wants to merge 3 commits intogh/osalpekar/25/basefrom
gh/osalpekar/25/head
Closed

Guard against negative rpcTimeout being passed in to RpcBackendOptions#38267
osalpekar wants to merge 3 commits intogh/osalpekar/25/basefrom
gh/osalpekar/25/head

Conversation

@osalpekar
Copy link
Copy Markdown
Contributor

@osalpekar osalpekar commented May 11, 2020

Stack from ghstack:

Assert that the rpcTimeout is positive in RpcBackendOptions
constructor

Differential Revision: D21509850

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/)
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented May 11, 2020

💊 CI failures summary and remediations

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


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

ci.pytorch.org: 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.

See how this bot performed.

This comment has been revised 5 times.

Comment thread torch/csrc/distributed/rpc/rpc_agent.h Outdated
: rpcTimeoutSeconds(rpcTimeoutSeconds),
initMethod(std::move(initMethod)) {}
initMethod(std::move(initMethod)) {
TORCH_CHECK(rpcTimeoutSeconds > 0, "RPC Timeout must be greater than 0");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, looks like we should support 0 - will update

@mrshenli
Copy link
Copy Markdown
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/)
@osalpekar osalpekar requested a review from mrshenli May 13, 2020 21:10
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in b57a339.

@facebook-github-bot facebook-github-bot deleted the gh/osalpekar/25/head branch May 18, 2020 14:16
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
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.

4 participants