xorbits.init#
- xorbits.init(address: str | None = None, init_local: bool = <no_default>, session_id: str | None = None, timeout: float | None = None, n_worker: int = 1, n_cpu: int | str = 'auto', mem_bytes: int | str = 'auto', cuda_devices: ~typing.List[int] | ~typing.List[~typing.List[int]] | str = 'auto', web: bool | str = 'auto', new: bool = True, storage_config: ~typing.Dict | None = None, **kwargs) None[source]#
Init Xorbits runtime locally or connect to an Xorbits cluster.
- Parameters:
address (str, optional) –
if None which is default, address will be “127.0.0.1”, a local runtime will be initialized
if specify an address for creating a new local runtime, specify like
<ip>:<port>if connect to a Xorbits cluster address, e.g.
http://<supervisor_ip>:<supervisor_web_port>
init_local (bool, no default value) –
Indicates if creating a new local runtime.
If has initialized,
init_localcannot be True, it will skip creating,When address is None and not initialized,
init_localwill be True,Otherwise, if it’s not specified, False will be set.
session_id (str, optional) – Session ID, if not specified, a new ID will be auto generated.
timeout (float) – Timeout about creating a new runtime or connecting to an existing cluster.
n_worker (int, optional) –
How many workers to start when creating a local runtime.
Note
Take effect only when
init_localis Truen_cpu (int, str) –
Number of CPUs, if
auto, the number of cores will be specified.Note
Take effect only when
init_localis Truemem_bytes (int, str) –
Memory to use, in bytes, if
auto, total memory bytes will be specified.Note
Take effect only when
init_localis Truecuda_devices (list of int, list of list) –
when
autowhich is default, all visible GPU devices will be usedWhen n_worker is 1, list of int can be specified, means the device indexes to use
When n_worker > 1, list of list can be specified for each worker.
Note
Take effect only when
init_localis Trueweb (bool, str) –
If creating a web UI.
Note
Take effect only when
init_localis Truenew (bool) –
If creating a new session when connecting to an existing cluster.
Note
Take effect only when
init_localis Falsestorage_config (dict, optional) –
storage backend and its configuration when init a new local cluster. Using
shared_memorystorage backend by default. Currently, support shared_memory` andmmaptwo options.Note
Take effect only when
init_localis True