-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Updated one_click.py #4994
Updated one_click.py #4994
Conversation
Add auto-detection of GPU Add GPU enum More dynamic requirement function Automated addition of the --cpu flag
I added newlines at the end of my new functions to fix pycodestyle problems
one_click.py
Outdated
print("N) None (I want to run models in CPU mode)") | ||
print() | ||
|
||
choice = input("Input> ").upper() | ||
while choice not in 'ABCDN': | ||
while choice not in 'ABCDE': |
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.
Missed an N
here
Your changes are excellent. My only concern is that there may be edge cases where the auto-select option does not work correctly, like:
What are your thoughts on this?
This was added for when Intel Arc gets its own requirements.txt file. In fact it probably should use requirements_cpu_only.txt / requirements_cpu_only_noavx2.txt since there are not any Intel wheels available. Otherwise this line can just be commented out. I made some additional changes to the one-click installer at #5056 and your review would be welcome if you are interested. |
Hello, thank you for your concise review. I'll make some changes to the code soon, I think we can address the first concern of failure with this by introducing exception catching. False positives may be of concern, but I don't think they should be too prevalent with the current gpu releases. The windows command works by using wmic to get the full name of the GPU, for example I don't have an apple device to test on, but I tested the lspci command on another linux device, and found an issue relating to false positives. It doesn't just report the GPU, but also the audio device. Example below.
This was unexpected, and I wasn't able to get it from my previous testing. I will mitigate this by using the command When multiple GPUs are detected, it will detect in the order of Nvidia, AMD, Intel. In the future, we may be able to find which one is most powerful, but for now it should be alright doing it in this order. #5056 lgtm :) - i'm new to open source contributions so I'm not sure how to merge it into this pr. The is_intel function shouldn't be problematic, I'll comment it out in the next series of commits, feel free to reverse that. Expect the changes/fixes to be made within the next hour or so. Thanks! |
This allows us to run the command once instead of up to 3 times.
- now we ignore the recommendations made that we're told to ignore in the contributing guidelines. - fixed E226 on line 480
As much as the GPU autodetection code is correct, I will opt to not include it because
The remaining changes are excellent:
I highly appreciate those changes. Thank you for this PR! |
--------- Co-authored-by: oobabooga <[email protected]>
Hello, I'm opening this pull request to change the following:
This should make it a slightly nicer experience for people installing.
When running pyflakes, I did receive the following recommendation, however it was there before. "one_click.py:282:5: local variable 'is_intel' is assigned to but never used". I don't think this should be problematic.
Checklist: