-
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: array_indices_axis helper updated to use args to control vals from dtypes_and_values helper #28168
fix: array_indices_axis helper updated to use args to control vals from dtypes_and_values helper #28168
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.
PR Compliance Checks
Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.
Issue Reference
In order to be considered for merging, the pull request description must refer to a specific issue number. This is described in our contributing guide and our PR template.
This check is looking for a phrase similar to: "Fixes #XYZ" or "Resolves #XYZ" where XYZ is the issue number that this PR is meant to address.
Hey, @joaozenobio , maybe you would like to take a look? It's a small change :) And it might solve the errors popping up in the test_gather() |
Hi @Kacper-W-Kozdon! Thank you for your PR 🚀 The modifications are valid. Could you confirm that those are enough to make the errors vanish by testing on your current torch.gather() with them? So you don't have to make another PR to solve the same issue again 😄 |
Test with 500 examples just on the torch backend, so it should be fine this time :) The errors in the end were caused by the mismatch between the effective range of dtypes and the order of the generated values- together with the gradient flag being set to True (that's where the too big values caused issues before the addition of safeties). Both PRs are ready for the review (maybe a separate pytest run); #27757 is already updated with the arguments
|
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 a lot @Kacper-W-Kozdon. These additional controls should have been already in array_indices_axis helper as they are pretty important sometimes but great that you added them now. Will merge this and will take a look at the other PR for gather. Thank you very much for the effort : )
PR Description
array_indices_axis helper updated to use args to control vals from dtypes_and_values helper.
Related Issue
array_indices_axis helper function did not ensure that generated values made sense for the dtype, for example generating values of the order 1e+38 for dtype float16. It might be the cause of some pytest fails.
Closes #
Checklist
Socials