data_juicer.utils.resource_utils module

data_juicer.utils.resource_utils.query_cuda_info(query_key)[源代码]
data_juicer.utils.resource_utils.get_cpu_count()[源代码]
data_juicer.utils.resource_utils.get_cpu_utilization()[源代码]
data_juicer.utils.resource_utils.query_mem_info(query_key)[源代码]
data_juicer.utils.resource_utils.get_ray_gpu_count()[源代码]

Get the number of available GPUs in the Ray cluster.

返回:

Number of available GPUs, or 0 if no GPUs are available or Ray is not initialized

返回类型:

int

data_juicer.utils.resource_utils.get_ray_gpu_memory()[源代码]

Get the available GPU memory in the Ray cluster.

返回:

Dictionary mapping GPU indices to available memory in MB, or empty dict if no GPUs available

返回类型:

dict