-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix min_max gpu memory logging bug #453
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
Fix min_max gpu memory logging bug #453
Conversation
Borda
left a comment
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 fine, but some proper testing would be fine... (I understand that most free CI does not have GPU, so pls copy-paste results from your computer)
| for k, v in zip(range(len(gpu_memory)), gpu_memory): | ||
| k = f'gpu_{k}' | ||
| gpu_memory_map[k] = v | ||
| gpu_memory = [int(x) for x in result.stdout.strip().split('\n')] |
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.
instead of \n consider using os.sep
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 your feedback. I used os.linesep instead.
|
@dreamgonfly love the PR! thanks for the great submission. @Borda i run every PR through GPU tests btw. |
I know, but for those who do not have avalaible couple of GPUs it is better to ask the author to show it... if you do not mind :) |

Before submitting
What does this PR do?
Fixes #452
Additionally, this PR updates & simplifies some code.
subprocess.runas officially recommended by python docs (refer to https://docs.python.org/3/library/subprocess.html#using-the-subprocess-module)Did you have fun?
Yes :)