-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fixed imports and docstring #95
Conversation
d-kleine
commented
Sep 19, 2024
- removed duplicated import of "platform" pkg
- fixed pip install command in docstring
watermark/watermark.py
Outdated
@@ -340,7 +339,7 @@ def _get_conda_env(): | |||
def _get_gpu_info(): | |||
if py3nvml is None: | |||
return {"GPU Info": "Install the gpu extra " | |||
"(pip install 'watermark[gpu]') " | |||
"(pip install watermark[gpu]) " |
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.
Thanks for the PR! I think this may not work on certain terminal shells (bash I think) and require the comment characters. Are the comment characters cause any issues on your terminal, which is why you removed them, or was this more of a cosmetic change?
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.
Are the comment characters cause any issues on your terminal, which is why you removed them, or was this more of a cosmetic change?
Did/Does not work for me in command shell, only when removing the '
characters:
Edit: Seems to be a command shell issue on Windows. It works fine in WSL (Ubuntu) and in Powershell on Windows.
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.
Huh, wow. What happens if you use the double-quote character: pip install "watermark[gpu]"
?
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.
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.
Oh nice. Just updated the line in this PR accordingly. Would that work for you?
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.
lgtm!
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.
@rasbt Ah, there is small typo, there is a wrong )
after [gpu]
. It should be
'(pip install "watermark[gpu]") '
not
'(pip install "watermark[gpu])") '