(ps_hosts, worker_hosts)
| 145 | worker_hosts = ["localhost:{}".format(portpicker.pick_unused_port())] |
| 146 | |
| 147 | def ps_fn(ps_hosts, worker_hosts): |
| 148 | cluster = server_lib.ClusterSpec( |
| 149 | {"ps": ps_hosts, "worker": worker_hosts}) |
| 150 | server = server_lib.Server( |
| 151 | cluster, job_name="ps", task_index=0, start=True, |
| 152 | config=self._config) |
| 153 | server.join() |
| 154 | |
| 155 | def worker_fn(ps_hosts, worker_hosts, worker_id): |
| 156 | cluster = server_lib.ClusterSpec( |