MCPcopy Create free account
hub / github.com/apache/singa / pull

Method pull

examples/hfl/src/client.py:101–109  ·  view source on GitHub ↗

Client pull weights from server. Namely server push weights from clients.

(self)

Source from the content-addressed store, hash-verified

99 self.sock.close()
100
101 def pull(self) -> None:
102 """Client pull weights from server.
103
104 Namely server push weights from clients.
105 """
106 message = proto.WeightsExchange()
107 message = utils.receive_message(self.sock, message)
108 for k, v in message.weights.items():
109 self.weights[k] = utils.deserialize_tensor(v)
110
111 def push(self) -> None:
112 """Client push weights to server.

Callers 1

runFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected