Skip to content
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

nvidia-ml-py version requirement #27

Closed
cjw85 opened this issue Sep 19, 2017 · 3 comments
Closed

nvidia-ml-py version requirement #27

cjw85 opened this issue Sep 19, 2017 · 3 comments

Comments

@cjw85
Copy link
Contributor

cjw85 commented Sep 19, 2017

I just upgraded to current HEAD from a previous version without nvidia-ml-py (I was planning to add in the power usage as in #13). I now get

$ gpustat --debug
Error on querying NVIDIA devices. Use --debug flag for details
Traceback (most recent call last):
  File "/home/<user>/.local/lib/python2.7/site-packages/gpustat-0.4.0.dev1-
py2.7.egg/gpustat.py", line 398, in print_gpustat
    gpu_stats = GPUStatCollection.new_query()
  File "/home/<user>/.local/lib/python2.7/site-packages/gpustat-0.4.0.dev1-
py2.7.egg/gpustat.py", line 300, in new_query
    gpu_info = get_gpu_info(handle)
  File "/home/<user>/.local/lib/python2.7/site-packages/gpustat-0.4.0.dev1-
py2.7.egg/gpustat.py", line 261, in get_gpu_info
    nv_graphics_processes = N.nvmlDeviceGetGraphicsRunningProcesses(handle)
AttributeError: 'module' object has no attribute 'nvmlDeviceGetGraphicsRunningProcesses'

During installation I had:

Searching for nvidia-ml-py==375.53.1
Best match: nvidia-ml-py 375.53.1
Adding nvidia-ml-py 375.53.1 to easy-install.pth file

So it looks like there are API differences between the versions of nvidia-ml-py. Can I ask which version you've been working with?

@wookayin
Copy link
Owner

It looks weird; 375.53.1 for me as well. I guess the following import also fails, right?

>>> import pynvml
>>> pynvml.nvmlDeviceGetGraphicsRunningProcesses
<function pynvml.nvmlDeviceGetGraphicsRunningProcesses>
>>> pynvml.__file__
'..(OMITTED)../site-packages/nvidia_ml_py-375.53.01-py2.7.egg/pynvml.pyc'

@cjw85
Copy link
Contributor Author

cjw85 commented Sep 19, 2017

Yes it does. I'll see if I can dig further. Thanks for now.

@cjw85
Copy link
Contributor Author

cjw85 commented Sep 19, 2017

OK, I installed in a virtual environment and had no issues. I then found that pynvml was being imported from /usr/local/lib/python2.7/dist-packages/ (Ubuntu 16.04) outside of the virtualenv, so I removed this. Things now work as expected.

@cjw85 cjw85 closed this as completed Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants