MCPcopy Create free account
hub / github.com/alibaba/graph-learn / deploy_in_worker_mode

Method deploy_in_worker_mode

graphlearn/python/graph.py:438–457  ·  view source on GitHub ↗
(self, tracker, hosts, task_index, task_count)

Source from the content-addressed store, hash-verified

436 self._server.init(self._edge_sources, self._node_sources)
437
438 def deploy_in_worker_mode(self, tracker, hosts, task_index, task_count):
439 if hosts:
440 pywrap.set_server_hosts(hosts)
441 hosts = hosts.split(',')
442 host = hosts[task_index]
443 task_count = len(hosts)
444 else:
445 host = "0.0.0.0:0"
446
447 assert task_index < task_count
448
449 pywrap.set_client_id(task_index)
450 pywrap.set_client_count(task_count)
451 pywrap.set_server_count(task_count)
452 pywrap.set_tracker(tracker)
453
454 self._client = Client(client_id=task_index)
455 self._server = Server(task_index, task_count, host, tracker)
456 self._server.start()
457 self._server.init(self._edge_sources, self._node_sources)
458
459 def deploy_in_server_mode(self, task_index, cluster, job_name):
460 if isinstance(cluster, dict):

Callers 1

initMethod · 0.95

Calls 4

ClientClass · 0.90
ServerClass · 0.90
startMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected