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

Function _distributed_available

dask/base.py:36–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

get_schedulerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected