| 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): |