MCPcopy
hub / github.com/dmlc/dgl / GetRoleRequest

Class GetRoleRequest

python/dgl/distributed/role.py:96–110  ·  view source on GitHub ↗

Send a request to get the roles of all client processes.

Source from the content-addressed store, hash-verified

94
95
96class GetRoleRequest(rpc.Request):
97 """Send a request to get the roles of all client processes."""
98
99 def __init__(self):
100 self.msg = GET_ROLE_MSG
101 self.group_id = rpc.get_group_id()
102
103 def __getstate__(self):
104 return self.msg, self.group_id
105
106 def __setstate__(self, state):
107 self.msg, self.group_id = state
108
109 def process_request(self, server_state):
110 return GetRoleResponse(server_state.roles[self.group_id])
111
112
113# The key is role, the value is a dict of mapping RPC rank to a rank within the role.

Callers 1

init_roleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected