Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions swanlab/data/run/metadata/hardware/gpu/nvidia.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def get_nvidia_gpu_info() -> HardwareFuncResult:
info["type"].append(gpu_name)
# 获取 GPU 的总显存, 单位为GB
info["memory"].append(round(pynvml.nvmlDeviceGetMemoryInfo(handle).total / (1024**3)))
except UnicodeDecodeError: # 部分GPU型号无法解码
return None, None
except pynvml.NVMLError:
pass
finally:
Expand Down
2 changes: 1 addition & 1 deletion swanlab/data/run/metadata/hardware/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __call__(self) -> Optional[HardwareInfoList]:
except NotImplementedError as n:
raise n
except Exception as e:
swanlog.error(f"Hardware info collection failed: {self.__class__.__name__}, {str(e)}")
swanlog.debug(f"Hardware info collection failed: {self.__class__.__name__}, {str(e)}")
return None
finally:
self.after_collect()
Expand Down
Loading