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
add GPU option for KNN classifier, update requirements.txt #8
Conversation
Thank you for catching the typos and including the gpu options! It looks good to me. My only question is for the environment setting. Juan and I discussed earlier that we might want to use pip instead of conda which is why I included the requirement.txt file, but of course conda is also a viable option. Should we just use conda instead @jccaicedo ? |
Good point! Using pip may be a better choice here if someone only wants to check their model's performance (on their current env) and doesn't want to switch to a new env to just evaluate it. I'll revert back to the requirements.txt. |
I have reverted back to using pip and have tested the installation on my machine. |
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 good to me!
Thank you for the PR, @chaudatascience ! @Zitong-Chen-16 can you review and test on your env? After it works, feel free to merge! |
Hey @chaudatascience! I tried running the updated code but ran into an issue. The code ran successfully without the gpu though. But I ran the code with the gpu option (i.e. with --use_gpu), I received the following error. Were you able to run it on your machine with the gpu option?
|
Yes. I was able to run it with GPU.
Can you try again to see if the error still persists? hmm, it seems that some people have encountered a similar problem, as reported link1 and link2. |
That solved the problem! I did the exact same thing to create the environment and pip install via the file earlier and ran into the issue, but conda install faiss-gpu and pytorch seemed to fix it. |
Can I merge the pull request now then @chaudatascience ? Maybe we could update the readme to include the conda install faiss-gpu after |
Yeah, I think we can update it later. |
Sounds good! Thank you!! |
Some small updates on the evaluation part: