zcollection.dask_utils.dask_workers#

zcollection.dask_utils.dask_workers(client, cores_only=False)[source]#

Return the number of dask workers available.

Parameters:
  • client (Client) – dask client

  • cores_only (bool) – if True, only the number of cores is returned, otherwise the total number of threads is returned.

Returns:

number of dask workers

Raises:

ValueError – If no dask workers are available.

Return type:

int