From 11b6019fb5954960db56c43ce2237e86e6696ddf Mon Sep 17 00:00:00 2001 From: Edward Oakes Date: Thu, 21 Oct 2021 21:21:50 -0500 Subject: [PATCH] [ray client] Fix connecting to a cluster without available CPUs (#19604) --- python/ray/client_builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ray/client_builder.py b/python/ray/client_builder.py index 6f4bdc920..27d7e9053 100644 --- a/python/ray/client_builder.py +++ b/python/ray/client_builder.py @@ -141,8 +141,8 @@ class ClientBuilder: job_config=self._job_config, _credentials=self._credentials, ray_init_kwargs=self._remote_init_kwargs) - dashboard_url = ray.get( - ray.remote(ray.worker.get_dashboard_url).remote()) + get_dashboard_url = ray.remote(ray.worker.get_dashboard_url) + dashboard_url = ray.get(get_dashboard_url.options(num_cpus=0).remote()) cxt = ClientContext( dashboard_url=dashboard_url, python_version=client_info_dict["python_version"],