| 302 | |
| 303 | |
| 304 | class _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 | |
| 329 | def _split_address(address: str) -> Tuple[str, str]: |
no outgoing calls
no test coverage detected
searching dependent graphs…