fix test because new jax 0.9.2 release#2155
Merged
Qazalbash merged 2 commits intopyro-ppl:masterfrom Mar 20, 2026
Merged
Conversation
Collaborator
|
Is this change working for older JAX? |
Collaborator
Author
Thanks for the feedback! With the latest commit b010649 it does work (I have tested locally) The fix is a one-line swap in _call_bind -- try the old positional API (bind(fn, *args)) first, which works on JAX <= 0.9.0. On JAX 0.9.2 it cleanly raises TypeError, triggering the fallback to the new subfuns API (bind(*args, subfuns=(fn,))). All 10 tests pass on JAX 0.9.0. |
fehiepsi
reviewed
Mar 20, 2026
| def _call_bind(primitive, fn, *args): | ||
| try: | ||
| return primitive.bind(fn, *args) | ||
| except TypeError: |
Member
There was a problem hiding this comment.
The typeerror might come from the fn, not from the bind method. Maybe check for jax version instead?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #2154