|
|
@ -111,8 +111,19 @@ class SwarmsIssueReporter:
|
|
|
|
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 ModuleNotFoundError as e:
|
|
|
|
|
|
|
|
# Handle the case where 'torch' is not installed
|
|
|
|
|
|
|
|
print(f"Error: {e}")
|
|
|
|
|
|
|
|
return False, None
|
|
|
|
|
|
|
|
except RuntimeError as e:
|
|
|
|
|
|
|
|
# Handle CUDA-related errors
|
|
|
|
|
|
|
|
print(f"Error: {e}")
|
|
|
|
return False, None
|
|
|
|
return False, None
|
|
|
|
|
|
|
|
except Exception as e:
|
|
|
|
|
|
|
|
# Catch any other exceptions
|
|
|
|
|
|
|
|
print(f"Unexpected error: {e}")
|
|
|
|
|
|
|
|
return False, None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _get_system_info(self) -> SwarmSystemInfo:
|
|
|
|
def _get_system_info(self) -> SwarmSystemInfo:
|
|
|
|
"""Collect system and Swarms-specific information."""
|
|
|
|
"""Collect system and Swarms-specific information."""
|
|
|
@ -207,9 +218,16 @@ class SwarmsIssueReporter:
|
|
|
|
for dist in pkg_resources.working_set:
|
|
|
|
for dist in pkg_resources.working_set:
|
|
|
|
deps.append(f"- {dist.key} {dist.version}")
|
|
|
|
deps.append(f"- {dist.key} {dist.version}")
|
|
|
|
return "\n".join(deps)
|
|
|
|
return "\n".join(deps)
|
|
|
|
except:
|
|
|
|
except ImportError as e:
|
|
|
|
|
|
|
|
# Handle the case where pkg_resources is not available
|
|
|
|
|
|
|
|
print(f"Error: {e}")
|
|
|
|
|
|
|
|
return "Unable to fetch dependency information"
|
|
|
|
|
|
|
|
except Exception as e:
|
|
|
|
|
|
|
|
# Catch any other unexpected exceptions
|
|
|
|
|
|
|
|
print(f"Unexpected error: {e}")
|
|
|
|
return "Unable to fetch dependency information"
|
|
|
|
return "Unable to fetch dependency information"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# First, add this method to your SwarmsIssueReporter class
|
|
|
|
# First, add this method to your SwarmsIssueReporter class
|
|
|
|
def _check_rate_limit(self) -> bool:
|
|
|
|
def _check_rate_limit(self) -> bool:
|
|
|
|
"""Check if we're within rate limits."""
|
|
|
|
"""Check if we're within rate limits."""
|
|
|
|