mirror of
https://github.com/clearml/clearml
synced 2025-05-03 12:31:00 +00:00
Fix machine specs when GPU is not supported
This commit is contained in:
parent
d83f1cd2c1
commit
d585535dcd
@ -335,6 +335,7 @@ class ResourceMonitor(BackgroundMonitor):
|
||||
|
||||
def _get_machine_specs(self):
|
||||
# type: () -> dict
|
||||
specs = {}
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
specs = {
|
||||
@ -347,10 +348,10 @@ class ResourceMonitor(BackgroundMonitor):
|
||||
'memory_gb': round(psutil.virtual_memory().total / 1024 ** 3, 1),
|
||||
'hostname': str(platform.node()),
|
||||
'gpu_count': 0,
|
||||
'gpu_type': '',
|
||||
'gpu_memory': '',
|
||||
'gpu_driver_version': '',
|
||||
'gpu_driver_cuda_version': '',
|
||||
'gpu_type': 'N/A',
|
||||
'gpu_memory': 'N/A',
|
||||
'gpu_driver_version': 'N/A',
|
||||
'gpu_driver_cuda_version': 'N/A',
|
||||
}
|
||||
if self._gpustat:
|
||||
gpu_stat = self._gpustat.new_query(shutdown=True, get_driver_info=True)
|
||||
@ -363,6 +364,6 @@ class ResourceMonitor(BackgroundMonitor):
|
||||
specs['gpu_driver_cuda_version'] = gpu_stat.driver_cuda_version or ''
|
||||
|
||||
except Exception:
|
||||
return {}
|
||||
pass
|
||||
|
||||
return specs
|
||||
|
Loading…
Reference in New Issue
Block a user