fix bare except and log the error E722

pull/737/head
evelynmitchell 4 months ago
parent 182829831e
commit 09ae2866fd

@ -108,10 +108,13 @@ class SwarmsIssueReporter:
cuda_available = torch.cuda.is_available() cuda_available = torch.cuda.is_available()
if cuda_available: if cuda_available:
gpu_info = torch.cuda.get_device_name(0) gpu_info = torch.cuda.get_device_name(0)
return cuda_available, gpu_info return cuda_available, gpu_info
return False, None return False, None
except: except ImportError:
return False, None
except Exception as e:
logger.error(f"Error getting GPU info: {str(e)}")
return False, None return False, None
def _get_system_info(self) -> SwarmSystemInfo: def _get_system_info(self) -> SwarmSystemInfo:

Loading…
Cancel
Save