MCPcopy
hub / github.com/ray-project/ray / connect

Method connect

python/ray/client_builder.py:305–326  ·  view source on GitHub ↗

Begin a connection to the address passed in via ray.client(...)

(self)

Source from the content-addressed store, hash-verified

303
304class _LocalClientBuilder(ClientBuilder):
305 def connect(self) -> ClientContext:
306 """
307 Begin a connection to the address passed in via ray.client(...)
308 """
309 if self._deprecation_warn_enabled:
310 self._client_deprecation_warn()
311 # Fill runtime env/namespace from environment if not already set.
312 # Should be done *after* the deprecation warning, since warning will
313 # check if those values are already set.
314 self._fill_defaults_from_env()
315
316 connection_dict = ray.init(address=self.address, job_config=self._job_config)
317 return ClientContext(
318 dashboard_url=connection_dict["webui_url"],
319 python_version="{}.{}.{}".format(
320 sys.version_info[0], sys.version_info[1], sys.version_info[2]
321 ),
322 ray_version=ray.__version__,
323 ray_commit=ray.__commit__,
324 _num_clients=1,
325 _context_to_restore=None,
326 )
327
328
329def _split_address(address: str) -> Tuple[str, str]:

Callers

nothing calls this directly

Calls 5

ClientContextClass · 0.85
initMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected