-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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: torch backend- gather fix #27757
Conversation
Co-authored-by: NripeshN <nripesh14@gmail.com>
Co-authored-by: NripeshN <nripesh14@gmail.com>
… and node_split from Splitter
Co-authored-by: NripeshN <nripesh14@gmail.com>
Co-authored-by: Bhushan Srivastava <59949692+he11owthere@users.noreply.github.com>
…on call (ivy-llc#27428) Co-authored-by: NripeshN <nripesh14@gmail.com>
Co-authored-by: NripeshN <nripesh14@gmail.com>
…splitter function
…ndefined behaviour caused by the lintbot
…ntend splitter moduel
…ption for invalid type (ivy-llc#27439)
…eters when doing a to_keras_module on an ivy.Module instance
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.
Hi @Kacper-W-Kozdon
Thnx for the fixes. The tests all look fine. You really have put a lot of effort into this :)
I might ask @vedpatwardhan to have a quick look before merging.
Sorry for the delays on my end. One question I still have is that your initial comment you said the torch backend implementation was wrong and pytest wasn't catching it. As long as i can see we have not broadened the test to include newer cases. We have only restricted it somewhat with safety and tolerances. So how do we know that those cases that were previously undetected are still not going unnoticed?
I'm not fully sure but I think my pytest was not installed properly at that time- gather() was my first contribution, the tests were passing even though they shouldn't have, which I haven't realised at first (after I reinstalled everything, they were, indeed, throwing errors). As for the recent errors- #28168 solved them; the tests for gather were generating values too big for their |
9be493a
to
53c652f
Compare
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! Could you please revert the changes to the demos
submodule? The PR should be good to merge once that's done @Ishticode. Thanks @Kacper-W-Kozdon 😄
Done, docs/demos changes reverted 👍 |
@vedpatwardhan @Ishticode I added explicitly the tolerance for |
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.
Would be worth confirming if the failures in test_paddle_gather
and test_paddle_gather_nd
are related to the changes made. Otherwise we're good to merge, thanks @Kacper-W-Kozdon @Ishticode 😄
This PR has been labelled as stale because it has been inactive for more than 7 days. If you would like to continue working on this PR, then please add another comment or this PR will be closed in 7 days. |
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.
the two tests referenced above were failing previously already. I think its good to merge. Thank you very much @Kacper-W-Kozdon for the great effort into this contribution. Thank you very much
PR Description
Previous implementation of gather() from torch backend was incorrect but did not get caught by pytest. I corrected a vast majority of issues. Pytest might still show some errors for edge cases due to the very limited implementation of torch.gather() and various workarounds needed to recreate tensorflow's ground truth behaviour, they'll likely be related to dimensionality and I'm still removing them (it's all in the conditions for reshaping and expanding). Side note: the official tensorflow's documentation for gather contains errors in the expression to calculate the dimensions of the output.
Related Issue
Closes #26498
Checklist
Socials