MCPcopy Create free account
hub / github.com/dask/dask / _distributed_available

Function _distributed_available

dask/base.py:35–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34
35def _distributed_available() -> bool:
36 # Lazy import in get_scheduler can be expensive
37 global _DistributedClient, _get_distributed_client, _DISTRIBUTED_AVAILABLE
38 if _DISTRIBUTED_AVAILABLE is not None:
39 return _DISTRIBUTED_AVAILABLE # type: ignore[unreachable]
40 try:
41 from distributed import Client as _DistributedClient
42 from distributed.worker import get_client as _get_distributed_client
43
44 _DISTRIBUTED_AVAILABLE = True
45 except ImportError:
46 _DISTRIBUTED_AVAILABLE = False
47 return _DISTRIBUTED_AVAILABLE
48
49
50__all__ = (

Callers 1

get_schedulerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected