Module agents¶
Parent classes¶
RpcCallee (agents.RpcCallee)¶
RpcCaller (agents.RpcCaller)¶
-
class
pytorch_seed_rl.agents.rpc_caller.RpcCaller(rank: int, callee_rref: torch.distributed.rpc.RRef)[source]¶ Bases:
objectRPC object that handles communication with an assigned RPC callee.
- Parameters
rank (int) – Rank given by the RPC group on initiation (as in
torch.distributed.rpc.init_rpc()).callee_rref (
torch.distributed.rpc.RRef) – RRef referencing a remoteRpcCallee.
-
loop()[source]¶ Main loop function of an
RpcCaller.Checks in with assigned
RpcCallee.Loops
_loop()untilself.shutdownis set True.Checks out with assigned
RpcCallee.Calls
_cleanup()
-
batched_rpc(*args, **kwargs) → torch.futures.Future[source]¶ Wrap for batched async RPC ran on remote callee.