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

Make py3nvml optional #92

Merged
merged 3 commits into from
Jul 2, 2023
Merged

Make py3nvml optional #92

merged 3 commits into from
Jul 2, 2023

Conversation

bnavigator
Copy link
Contributor

Not everyone has or wants to install bindings for a proprietary NVIDIA library. Let's keep it optional.

Copy link
Owner

@rasbt rasbt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds fair, Thanks for the PR! There's only one little tweak I'd suggest as mentioned below.

"available for this machine."}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in that case, I'd say if py3nvml = None, we should probably then show a different message. I guess most users will interpret

"GPU information is not available for this machine."

as a GPU not being present or the GPU not being detected.

If someone uses the gpu flag and py3nvml = None, we should probably show something like

"Please install the py3nvml dependency (pip install py3nvml) to display GPU information."

@rasbt
Copy link
Owner

rasbt commented Jul 2, 2023

LGTM, thanks for the update!

@rasbt rasbt merged commit 2dc6d92 into rasbt:master Jul 2, 2023
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Jul 4, 2023
https://build.opensuse.org/request/show/1096410
by user bnavigator + dimstar_suse
- Update to 2.4.3
  * Make py3nvml installation for GPU info optional.
    (replaces watermark-pr92-optional-py3nvml.patch)

- Update to 2.4.2
  * Adds a new --gpu flag to print out GPU information (currently
    limited to NVIDIA devices) (#90, via contribution by
    907Resident)
  * (2.4.0 to 2.4.2: Packaging fixes)
- Add watermark-pr92-optional-py3nvml.patch gh#rasbt/watermark#92
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

Successfully merging this pull request may close these issues.

2 participants