Skip to content

[RPC] Support timeout in rref._get_type()#50498

Closed
rohan-varma wants to merge 3 commits intogh/rohan-varma/215/basefrom
gh/rohan-varma/215/head
Closed

[RPC] Support timeout in rref._get_type()#50498
rohan-varma wants to merge 3 commits intogh/rohan-varma/215/basefrom
gh/rohan-varma/215/head

Conversation

@rohan-varma
Copy link
Copy Markdown
Contributor

@rohan-varma rohan-varma commented Jan 13, 2021

Stack from ghstack:

This change is mostly needed for the next diff in this stack, where
rref._get_type() is called in the rpc_async/rpc_sync RRef proxy function and
can block indefinitely if there is no timeout. It will also be useful to have a
timeout argument when we publicize this API to keep it consistent with other
RPC APIs.

Differential Revision: D25897588

NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!

This change is mostly needed for the next diff in this stack, where
rref._get_type() is called in the rpc_async/rpc_sync RRef proxy function and
can block indefinitely if there is no timeout. It will also be useful to have a
timeout argument when we publicize this API to keep it consistent with other
RPC APIs.

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25897588/)!

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot added cla signed oncall: distributed Add this issue/PR to distributed oncall triage queue labels Jan 13, 2021
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Jan 13, 2021

💊 CI failures summary and remediations

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


💚 💚 Looks good so far! There are no failures yet. 💚 💚


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 to the (internal) Dr. CI Users group.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 14, 2021

Codecov Report

Merging #50498 (38fc8d5) into gh/rohan-varma/215/base (9efe153) will increase coverage by 0.05%.
The diff coverage is 47.05%.

@@                     Coverage Diff                     @@
##           gh/rohan-varma/215/base   #50498      +/-   ##
===========================================================
+ Coverage                    80.67%   80.73%   +0.05%     
===========================================================
  Files                         1910     1910              
  Lines                       207842   207195     -647     
===========================================================
- Hits                        167684   167273     -411     
+ Misses                       40158    39922     -236     

Comment thread torch/csrc/distributed/rpc/init.cpp Outdated
Comment on lines +387 to +391
timeout (float, optional): Timeout for ``_get_type``. If
the call does not complete within this timeframe, an
exception indicating so will be raised. If this
argument is not provided, the default RPC timeout will
be used.
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.

The doc should mention the unit for the timeout (seconds/milliseconds etc.)

This change is mostly needed for the next diff in this stack, where
rref._get_type() is called in the rpc_async/rpc_sync RRef proxy function and
can block indefinitely if there is no timeout. It will also be useful to have a
timeout argument when we publicize this API to keep it consistent with other
RPC APIs.

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25897588/)!

[ghstack-poisoned]
This change is mostly needed for the next diff in this stack, where
rref._get_type() is called in the rpc_async/rpc_sync RRef proxy function and
can block indefinitely if there is no timeout. It will also be useful to have a
timeout argument when we publicize this API to keep it consistent with other
RPC APIs.

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25897588/)!

[ghstack-poisoned]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in ab1ba8f.

@facebook-github-bot facebook-github-bot deleted the gh/rohan-varma/215/head branch January 19, 2021 15:17
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: pytorch#50498

This change is mostly needed for the next diff in this stack, where
rref._get_type() is called in the rpc_async/rpc_sync RRef proxy function and
can block indefinitely if there is no timeout. It will also be useful to have a
timeout argument when we publicize this API to keep it consistent with other
RPC APIs.
ghstack-source-id: 119859767

Test Plan: Added UT

Reviewed By: pritamdamania87

Differential Revision: D25897588

fbshipit-source-id: 2e84aaf7e4faecf80005c78ee2ac8710f387503e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged oncall: distributed Add this issue/PR to distributed oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants