(address: Optional[str])
| 338 | |
| 339 | |
| 340 | def _get_builder_from_address(address: Optional[str]) -> ClientBuilder: |
| 341 | if address == "local": |
| 342 | return _LocalClientBuilder("local") |
| 343 | if address is None: |
| 344 | # NOTE: This is not placed in `Node::get_temp_dir_path`, because |
| 345 | # this file is accessed before the `Node` object is created. |
| 346 | address = ray._private.services.canonicalize_bootstrap_address(address) |
| 347 | return _LocalClientBuilder(address) |
| 348 | module_string, inner_address = _split_address(address) |
| 349 | try: |
| 350 | module = importlib.import_module(module_string) |
| 351 | except Exception as e: |
| 352 | raise RuntimeError( |
| 353 | f"Module: {module_string} does not exist.\n" |
| 354 | f"This module was parsed from Address: {address}" |
| 355 | ) from e |
| 356 | assert "ClientBuilder" in dir( |
| 357 | module |
| 358 | ), f"Module: {module_string} does not have ClientBuilder." |
| 359 | return module.ClientBuilder(inner_address) |
| 360 | |
| 361 | |
| 362 | @Deprecated |
no test coverage detected
searching dependent graphs…