-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PyNVML 12 #215
Use PyNVML 12 #215
Conversation
/ok to test |
Seeing the following test failures on CI: ______ ERROR collecting jupyterlab_nvdashboard/tests/test_cpu_handlers.py ______
jupyterlab_nvdashboard/apps/gpu.py:15: in <module>
nvlink_ver = pynvml.nvmlDeviceGetNvLinkVersion(gpu_handles[0], 0)
/opt/conda/envs/test/lib/python3.13/site-packages/pynvml.py:3846: in nvmlDeviceGetNvLinkVersion
_nvmlCheckReturn(ret)
/opt/conda/envs/test/lib/python3.13/site-packages/pynvml.py:979: in _nvmlCheckReturn
raise NVMLError(ret)
E pynvml.NVMLError_NotSupported: Not Supported
During handling of the above exception, another exception occurred:
jupyterlab_nvdashboard/tests/test_cpu_handlers.py:5: in <module>
from jupyterlab_nvdashboard.apps.cpu import CPUResourceWebSocketHandler
jupyterlab_nvdashboard/__init__.py:13: in <module>
from .handlers import setup_handlers
jupyterlab_nvdashboard/handlers.py:2: in <module>
from . import apps
jupyterlab_nvdashboard/apps/__init__.py:2: in <module>
from . import gpu
jupyterlab_nvdashboard/apps/gpu.py:32: in <module>
except (IndexError, pynvml.nvml.NVMLError_NotSupported):
E AttributeError: module 'pynvml' has no attribute 'nvml' ______ ERROR collecting jupyterlab_nvdashboard/tests/test_gpu_handlers.py ______
jupyterlab_nvdashboard/apps/gpu.py:15: in <module>
nvlink_ver = pynvml.nvmlDeviceGetNvLinkVersion(gpu_handles[0], 0)
/opt/conda/envs/test/lib/python3.13/site-packages/pynvml.py:3846: in nvmlDeviceGetNvLinkVersion
_nvmlCheckReturn(ret)
/opt/conda/envs/test/lib/python3.13/site-packages/pynvml.py:979: in _nvmlCheckReturn
raise NVMLError(ret)
E pynvml.NVMLError_NotSupported: Not Supported
During handling of the above exception, another exception occurred:
jupyterlab_nvdashboard/tests/test_gpu_handlers.py:5: in <module>
from jupyterlab_nvdashboard.apps.gpu import (
jupyterlab_nvdashboard/__init__.py:13: in <module>
from .handlers import setup_handlers
jupyterlab_nvdashboard/handlers.py:2: in <module>
from . import apps
jupyterlab_nvdashboard/apps/__init__.py:2: in <module>
from . import gpu
jupyterlab_nvdashboard/apps/gpu.py:32: in <module>
except (IndexError, pynvml.nvml.NVMLError_NotSupported):
E AttributeError: module 'pynvml' has no attribute 'nvml' |
There is no It looks like we need to update 3 lines in |
The `pynvml.nvml` namespace wasn't needed in PyNVML 11 and does not exist in PyNVML 12. So drop the `nvml` and use `pynvml` directly.
Thanks Rick! 🙏 How do the changes above look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me, based on my read of https://github.com/gpuopenanalytics/pynvml/blob/38da53a9bb031277690d6135dd3be02deb9296ac/pynvml_utils/smi.py and @rjzamora 's comments.
Would be good if @rjzamora can approve too (or at least, comment on this before the next release of jupyterlab-nvdashboard
).
Asked Rick offline, but didn't hear back. Am guessing he is already on holiday Given the issue above was caused by a test failure, which is resolved by the change, and Rick gave such a good description of the change required there wasn't another way to interpret it, think we have addressed his review Also want to make sure these PRs are not lingering after the holidays. So am going to go ahead and merge If Rick has more feedback, am happy to follow up with him |
Fixed issue: #150 |
Bump
pynvml
from11
to12
. This version ofpynvml
also now depends onnvidia-ml-py
for core functionality.