Skip to content

Commit

Permalink
Fix for bytes/str discrepancy after PyNVML update
Browse files Browse the repository at this point in the history
  • Loading branch information
pentschev committed Feb 15, 2023
1 parent ca10a7c commit fca95c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions distributed/diagnostics/nvml.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ def _get_memory_total(h):
def _get_name(h):
try:
return pynvml.nvmlDeviceGetName(h).decode()
except AttributeError:
return pynvml.nvmlDeviceGetName(h)
except pynvml.NVMLError_NotSupported:
return None

Expand Down

0 comments on commit fca95c0

Please sign in to comment.