[ray client] Fix connecting to a cluster without available CPUs (#19604)

This commit is contained in:
Edward Oakes 2021-10-21 21:21:50 -05:00 committed by GitHub
parent 920384f34e
commit 11b6019fb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"],