Skip to content

Commit 1f112a1

Browse files
Replace pynvml with nvidia-ml-py in dependencies and error messages
Co-authored-by: AlexeyKozhevin <[email protected]>
1 parent 30abe00 commit 1f112a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nbtools/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_available_gpus(n=1, min_free_memory=0.9, max_processes=2, verbose=False,
155155
try:
156156
import pynvml
157157
except ImportError as exception:
158-
raise ImportError('Install Python interface for nvidia_smi') from exception
158+
raise ImportError('Install nvidia-ml-py package') from exception
159159

160160
try:
161161
error_message = None
@@ -220,7 +220,7 @@ def get_gpu_free_memory(index, ratio=True):
220220
try:
221221
import pynvml
222222
except ImportError as exception:
223-
raise ImportError('Install Python interface for nvidia_smi') from exception
223+
raise ImportError('Install nvidia-ml-py package') from exception
224224

225225
pynvml.nvmlInit()
226226
pynvml.nvmlDeviceGetCount()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
zip_safe=False,
2828
platforms='any',
2929
install_requires=[
30-
'pynvml>=11.5.0',
30+
'nvidia-ml-py>=12.0.0',
3131
'blessed>=1.17',
3232
'psutil>=5.6',
3333
'requests>=2.24',

0 commit comments

Comments
 (0)