-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ENH Add Array API compatibility to cosine_similarity
#29014
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
Conversation
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 @EdAbati. However it already needs an update with conflict resolution w.r.t. the main
branch.
Do you have a chance to run the tests on a CUDA host or do you want somebody else to do it? (I can do it).
Thank you @ogrisel for the quick reply!
Yes, I tested on CUDA in Google Colab and on my Mac (using |
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 once the proposed argument renaming discussed above is implemented.
Thank you very much!:) |
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. Thanks @EdAbati
@EdAbati Just for some guidance, how did you run this code in google colab so that we can test with gpus? |
Thanks again @OmarManzoor :) I just published the Google Colab notebook in a gist: https://gist.github.com/EdAbati/ff3bdc06bafeb92452b3740686cc8d7c |
Thank you for sharing! |
Reference Issues/PRs
Towards #26024
What does this implement/fix? Explain your changes.
It makes the
cosine_similarity
implementation compatible and tested with the Array API.Please let me know how I can improve it :)
cc @ogrisel @betatim