reprospect.utils.detect module

class reprospect.utils.detect.GPUDetectorView on GitHub

Bases: object

Detect all available GPUs using nvidia-smi.

Note

By default, results are cached.

COLUMNS: ClassVar[dict[str, type[str] | dtype]] = {'compute_cap': <class 'str'>, 'index': dtype('int32'), 'name': <class 'str'>, 'uuid': <class 'str'>}
classmethod clear_cache() NoneView on GitHub

Clear the cached GPU detection results.

classmethod count(*, cache: bool = True) intView on GitHub

Get the number of available GPUs.

classmethod detect(*, enrich: bool = True) DataFrameView on GitHub

Implementation of the detection.

classmethod get(*, cache: bool = True, enrich: bool = True) DataFrameView on GitHub
reprospect.utils.detect.main() NoneView on GitHub