MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / connect

Method connect

imperative/python/megengine/distributed/server.py:213–223  ·  view source on GitHub ↗

r"""Check connection success.

(self)

Source from the content-addressed store, hash-verified

211 self.bcast_dict = defaultdict(lambda: 0)
212
213 def connect(self):
214 r"""Check connection success."""
215 while True:
216 try:
217 self.proxy = ServerProxy(
218 "http://{}:{}".format(self.master_ip, self.port), allow_none=True
219 )
220 if self.proxy.connect():
221 break
222 except:
223 time.sleep(1)
224
225 def get_mm_server_port(self):
226 r"""Get multiple machine server port."""

Callers 4

__init__Method · 0.95
putMethod · 0.45
getMethod · 0.45
initializeMethod · 0.45

Calls 2

sleepMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected