r""" a helper function to run method on the owner of rref and fetch back the result using RPC
(method, rref, *args, **kwargs)
| 39 | |
| 40 | |
| 41 | def _remote_method(method, rref, *args, **kwargs): |
| 42 | r""" |
| 43 | a helper function to run method on the owner of rref and fetch back the |
| 44 | result using RPC |
| 45 | """ |
| 46 | args = [method, rref] + list(args) |
| 47 | return rpc_sync(rref.owner(), _call_method, args=args, kwargs=kwargs) |
| 48 | |
| 49 | |
| 50 | class Policy(nn.Module): |