xorbits.init#
- xorbits.init(address: Optional[str] = None, init_local: bool = _NoDefault.no_default, session_id: Optional[str] = None, timeout: Optional[float] = None, n_worker: int = 1, n_cpu: Union[int, str] = 'auto', mem_bytes: Union[int, str] = 'auto', cuda_devices: Union[List[int], List[List[int]], str] = 'auto', web: Union[bool, str] = 'auto', new: bool = True, **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.
When address is None,
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 exising 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 False