-
Notifications
You must be signed in to change notification settings - Fork 135
Fix JAX implementation of Argmax #809
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
71fe3b9
Edited xfail reason for some 3 JAX tests
HangenYuu a170d33
Update tests/link/jax/test_extra_ops.py
HangenYuu d0fdd6e
Remove expected fail mark for test that actually passes
HangenYuu 63b0832
Merge branch 'xfail_reason_update' of https://github.com/HangenYuu/py…
HangenYuu 68e245f
Changed reason for xfail
HangenYuu 3679791
Edited xfail reason for some 3 JAX tests
HangenYuu ae0801d
Remove expected fail mark for test that actually passes
HangenYuu f287d6c
Update tests/link/jax/test_extra_ops.py
HangenYuu 8b05952
Changed reason for xfail
HangenYuu 88b17b3
Merge branch 'xfail_reason_update' of github.com:HangenYuu/pytensor i…
HangenYuu 349beef
Edited xfail reason for some 3 JAX tests
HangenYuu 8ed6ab2
Remove expected fail mark for test that actually passes
HangenYuu b50a906
Update tests/link/jax/test_extra_ops.py
HangenYuu 89c7bff
Changed reason for xfail
HangenYuu 2c4a378
Rebase to remove MaxAndArgmax
HangenYuu c3c5fd0
Merge branch 'xfail_reason_update' of github.com:HangenYuu/pytensor i…
HangenYuu be9c9f8
Edited implementation of argmax. Changed test name for multiomni_output
HangenYuu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Okay so the source of this error is just the dispatch implementation of Argmax using Jax arrays for the transpose axis and the reshape operation. Changing those to use numpy arrays and converting to tuple before they are actually used allows the test to pass. Something like this:
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.
We should rename the test to be just test
max_and_argmax
, it is no longer a multioutput Operation, so the old name doesn't make sense. Also can you confirm this is the only test we had for Max / Argmax in JAX?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.
Yes that's the only test for Max/Argmax we have.