dasf.utils.funcs
Generic and regular functions.
Attributes
Classes
ProgressBar representation for ipython notebooks only. |
Functions
|
converts data size into the proper measurement |
|
Returns a list of workers (sorted), and the DNS name for the master host |
|
Synchronize all futures submitted to workers. |
|
Download a generic file and save it. |
|
Download a file from Google Drive using gdrive file id. |
Return free memory available from a single machine. |
|
Return executor as a CPU (default) instance. |
|
Return executor as a CPU instance. |
|
Return executor as a GPU instance. |
|
Return executor as a Multi CPU instance. |
|
Return executor as a GPU instance. |
|
|
Return if the executor is a single machine instance. |
|
Return if the executor is a cluster instance. |
|
Return if the executor is a CPU instance. |
|
Return if the executor is a GPU instance. |
|
Return the executor type as a string. |
Return if GPU is supported. |
|
Return if kvikio is supported (installed). |
|
Return if GPU Direct Store is supported. |
|
Return if Kvikio is running in compatibility mode. |
|
Return if NVidia Compressor Codecs are supported. |
|
Return if JAX is supported. |
|
Return if Dask is supported locally by the executor. |
|
Get Dask runner stanza. |
|
|
Get backend support. |
Return if Dask is supported by the executor. |
|
Return if any node supports GPU. |
|
Return if any worker has a GPU available. |
|
Get single node GPU count. |
|
|
Get how many GPUs are available in each worker. |
|
Get all GPU names of each worker. |
|
Reduce the chunk according the new output size. |
|
Trim an overlapped chunk to the exact size of the chunk. |
|
Get Dask memory usage profile. |
Return if the code is being executed in a IPyNotebook. |
|
|
Produces a NDArray for a given shape with a Gaussian Distribution in all directions starting from the center |
|
Produces a NDArray for a given shape with a decreasing rate starting from the center |
Module Contents
- dasf.utils.funcs.GPU_SUPPORTED
- dasf.utils.funcs.JAX_SUPPORTED
- dasf.utils.funcs.KVIKIO_SUPPORTED = True
- dasf.utils.funcs.NV_COMP_BATCH_CODEC_SUPPORTED = True
- dasf.utils.funcs.human_readable_size(size, decimal=3)[source]
converts data size into the proper measurement
- Return type:
str
- dasf.utils.funcs.get_worker_info(client)[source]
Returns a list of workers (sorted), and the DNS name for the master host The master is the 0th worker’s host
- Return type:
list
- class dasf.utils.funcs.NotebookProgressBar[source]
Bases:
threading.Thread
ProgressBar representation for ipython notebooks only.
Constructor of the Progress Bar
- MIN_CUR
- MIN_TOTAL
- bar = None
- percentage = None
- data = None
- __lock
- __current
- __total
- __error = False
- dasf.utils.funcs.download_file(url, filename=None, directory=None)[source]
Download a generic file and save it.
- dasf.utils.funcs.download_file_from_gdrive(file_id, filename=None, directory=None)[source]
Download a file from Google Drive using gdrive file id.
- dasf.utils.funcs.get_machine_memory_avail()[source]
Return free memory available from a single machine.
- dasf.utils.funcs.is_executor_single(dtype)[source]
Return if the executor is a single machine instance.
- Return type:
bool
- dasf.utils.funcs.is_executor_cluster(dtype)[source]
Return if the executor is a cluster instance.
- Return type:
bool
- dasf.utils.funcs.is_executor_cpu(dtype)[source]
Return if the executor is a CPU instance.
- Return type:
bool
- dasf.utils.funcs.is_executor_gpu(dtype)[source]
Return if the executor is a GPU instance.
- Return type:
bool
- dasf.utils.funcs.executor_to_string(dtype)[source]
Return the executor type as a string.
- Return type:
str
- dasf.utils.funcs.is_kvikio_supported()[source]
Return if kvikio is supported (installed).
- Return type:
bool
- dasf.utils.funcs.is_gds_supported()[source]
Return if GPU Direct Store is supported.
- Return type:
bool
- dasf.utils.funcs.is_kvikio_compat_mode()[source]
Return if Kvikio is running in compatibility mode.
- Return type:
bool
- dasf.utils.funcs.is_nvcomp_codec_supported()[source]
Return if NVidia Compressor Codecs are supported.
- Return type:
bool
- dasf.utils.funcs.is_dask_local_supported()[source]
Return if Dask is supported locally by the executor.
- Return type:
bool
- dasf.utils.funcs.is_dask_supported()[source]
Return if Dask is supported by the executor.
- Return type:
bool
- dasf.utils.funcs.is_dask_gpu_supported()[source]
Return if any node supports GPU.
- Return type:
bool
- dasf.utils.funcs.get_gpu_from_workers()[source]
Return if any worker has a GPU available.
- Return type:
bool
- dasf.utils.funcs.get_dask_gpu_count(fetch=True)[source]
Get how many GPUs are available in each worker.
- Return type:
int
- dasf.utils.funcs.get_dask_gpu_names(fetch=True)[source]
Get all GPU names of each worker.
- Return type:
list
- dasf.utils.funcs.block_chunk_reduce(dask_data, output_chunk)[source]
Reduce the chunk according the new output size.
- dasf.utils.funcs.trim_chunk_location(block_info, depth, index=0)[source]
Trim an overlapped chunk to the exact size of the chunk.
- dasf.utils.funcs.is_notebook()[source]
Return if the code is being executed in a IPyNotebook.
- Return type:
bool