Skip to content

async_execution and RRef helpers do not work together #41123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mrshenli opened this issue Jul 8, 2020 · 1 comment
Closed

async_execution and RRef helpers do not work together #41123

mrshenli opened this issue Jul 8, 2020 · 1 comment
Assignees
Labels
module: rpc Related to RPC, distributed autograd, RRef, and distributed optimizer triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@mrshenli
Copy link
Contributor

mrshenli commented Jul 8, 2020

The following code does not work

class Model:
    ...
    @staticmethod
    @rpc.functions.async_execution
    def func(x):
        ...

model_rref = rpc.remote("worker1", Model)
model_rref.rpc_sync().func(x)

This is because the _local_invoke function ignored the attribute installed by the decorator. To fix this, we will need to have another version of _local_invoke which is decorated by @rpc.functions.async_execution and returns the Future object from the wrapped function.

def _invoke_rpc(rref, rpc_api, func_name, *args, **kwargs):
return rpc_api(
rref.owner(),
_local_invoke,
args=(rref, func_name, args, kwargs)
)

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528 @jjlilley @osalpekar @jiayisuse

@mrshenli mrshenli added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: rpc Related to RPC, distributed autograd, RRef, and distributed optimizer labels Jul 8, 2020
@mrshenli mrshenli self-assigned this Jul 8, 2020
@mrshenli
Copy link
Contributor Author

mrshenli commented Oct 9, 2020

closed by #44666 and #44716

@mrshenli mrshenli closed this as completed Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: rpc Related to RPC, distributed autograd, RRef, and distributed optimizer triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

1 participant