File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 8
8
from packaging .version import parse as parse_version
9
9
10
10
import dask
11
+ from dask .utils import ensure_unicode
11
12
12
13
try :
13
14
import pynvml
@@ -68,11 +69,6 @@ def _in_wsl():
68
69
return "microsoft-standard" in uname ().release
69
70
70
71
71
- def _maybe_decode (value ):
72
- """Decode if bytes instance"""
73
- return value .decode () if isinstance (value , bytes ) else value
74
-
75
-
76
72
def init_once ():
77
73
"""Idempotent (per-process) initialization of PyNVML
78
74
@@ -110,7 +106,7 @@ def init_once():
110
106
return
111
107
112
108
if _in_wsl () and parse_version (
113
- _maybe_decode (pynvml .nvmlSystemGetDriverVersion ())
109
+ ensure_unicode (pynvml .nvmlSystemGetDriverVersion ())
114
110
) < parse_version (MINIMUM_WSL_VERSION ):
115
111
NVML_STATE = NVMLState .DISABLED_WSL_INSUFFICIENT_DRIVER
116
112
return
You can’t perform that action at this time.
0 commit comments