Start ray client server with 'ray start' (#13217)

This commit is contained in:
Philipp Moritz
2021-01-06 21:04:14 -08:00
committed by GitHub
parent 9ae5bba7cf
commit 9872fc1801
10 changed files with 127 additions and 8 deletions
+20
View File
@@ -752,6 +752,23 @@ class Node:
assert ray_constants.PROCESS_TYPE_MONITOR not in self.all_processes
self.all_processes[ray_constants.PROCESS_TYPE_MONITOR] = [process_info]
def start_ray_client_server(self):
"""Start the ray client server process."""
stdout_file, stderr_file = self.get_log_file_handles(
"ray_client_server", unique=True)
process_info = ray._private.services.start_ray_client_server(
self._redis_address,
self._ray_params.ray_client_server_port,
stdout_file=stdout_file,
stderr_file=stderr_file,
redis_password=self._ray_params.redis_password,
fate_share=self.kernel_fate_share)
assert (ray_constants.PROCESS_TYPE_RAY_CLIENT_SERVER not in
self.all_processes)
self.all_processes[ray_constants.PROCESS_TYPE_RAY_CLIENT_SERVER] = [
process_info
]
def start_head_processes(self):
"""Start head processes on the node."""
logger.debug(f"Process STDOUT and STDERR is being "
@@ -764,6 +781,9 @@ class Node:
self.start_monitor()
if self._ray_params.ray_client_server_port:
self.start_ray_client_server()
if self._ray_params.include_dashboard:
self.start_dashboard(require_dashboard=True)
elif self._ray_params.include_dashboard is None: