File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
swanlab/data/run/metadata/hardware Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ def get_nvidia_gpu_info() -> HardwareFuncResult:
44
44
info ["type" ].append (gpu_name )
45
45
# 获取 GPU 的总显存, 单位为GB
46
46
info ["memory" ].append (round (pynvml .nvmlDeviceGetMemoryInfo (handle ).total / (1024 ** 3 )))
47
+ except UnicodeDecodeError : # 部分GPU型号无法解码
48
+ return None , None
47
49
except pynvml .NVMLError :
48
50
pass
49
51
finally :
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ def __call__(self) -> Optional[HardwareInfoList]:
130
130
except NotImplementedError as n :
131
131
raise n
132
132
except Exception as e :
133
- swanlog .error (f"Hardware info collection failed: { self .__class__ .__name__ } , { str (e )} " )
133
+ swanlog .debug (f"Hardware info collection failed: { self .__class__ .__name__ } , { str (e )} " )
134
134
return None
135
135
finally :
136
136
self .after_collect ()
You can’t perform that action at this time.
0 commit comments