-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Make dependency on pynvml optional #378
Comments
What system are you running on? (Also, where exactly would a recommendation fit in? I worry this would add confusion). (In principle, I don't see why it didn't install pynvml as it is in requirements.txt and setup.py...) |
I'm running Debian GNU/Linux. I installed scalene semi-manually without using pip. (I avoid using pip if I can help it for several reasons that are off-topic here.) My point is that scalene is a general-purpose profiler, and pynvml is a specific library that is only of specialist interest (by far most Python programmers never do Nvidia GPU programming). Moreover, while scalene is an open-source tool for an open-source language that is firmly embedded in the open-source community, pynvml is only useful for people who run Nvidia's non-free drivers. |
Hi @emeryberger I've tagged this issue against the Dask issue 5768 (above), by installing Dask + Scalene we get a non-functioning Dask. |
OK, what is the desired behavior? I can remove it from requirements and setup; I can then have Scalene print a warning that pynvml needs to be installed (on non-Apple systems) to profile NVIDIA GPUs, if any (this might be annoying to always see when running Scalene - alternative approaches welcome). |
The fact that |
@ianozsvald I recently removed the dependency on |
@emeryberger on a fresh install everything looks good, thanks. I built a fresh To be clear -
|
Thanks! The latest release removes the |
I am closing this since I think the current behavior is ideal (now that it isn't interfering with Dask): Scalene silently ignores GPUs when they aren't found, and uses them automatically when found. |
It seems to me that the dependency on
pynvml
could be made optional. I just installed scalene from git (version 1.1.15-1525-gf05850d) and it did not want to run due to missing pynvml. So I uncommented the lineimport pynvml
at the top of the filescalene/scalene_gpu.py
and it seems to work now.It seems unnecessary to have a hard dependency where a recommendation would suffice. Specifically, a majority of python profile users is most likely not doing Nvidia GPU programming.
The text was updated successfully, but these errors were encountered: