Skip to content

Handle the new JAX bind-params API#41

Closed
gcarleo wants to merge 3 commits intomicrosoft:mainfrom
netket:codex/fix-get-bind-params
Closed

Handle the new JAX bind-params API#41
gcarleo wants to merge 3 commits intomicrosoft:mainfrom
netket:codex/fix-get-bind-params

Conversation

@gcarleo
Copy link

@gcarleo gcarleo commented Mar 20, 2026

Summary

  • normalize primitive.get_bind_params(...) in the interpreter
  • gate the compatibility behavior on jax >= 0.9.2
  • add regression tests covering both the legacy tuple-return API and the new dict-return API

Root cause

For newer JAX versions, some primitives such as integer_pow, lt, and jit return a plain dict from primitive.get_bind_params(...) instead of (subfuns, params). folx still unpacked the result unconditionally, which caused failures like ValueError: not enough values to unpack.

Validation

  • uv run --no-dev --with pytest --with pytest-xdist pytest test/test_interpreter.py test/test_customjvp.py test/test_operator.py
  • uv run --python 3.13 --no-dev --with pytest --with pytest-xdist --with jax==0.9.2 --with jaxlib==0.9.2 pytest test/test_interpreter.py test/test_customjvp.py test/test_operator.py

Both runs passed locally.

@gcarleo
Copy link
Author

gcarleo commented Mar 20, 2026

@microsoft-github-policy-service agree

@gcarleo
Copy link
Author

gcarleo commented Mar 20, 2026

Closing this in favor of a clean replacement PR based directly on microsoft/main, without the unrelated netket-only commits that caused conflicts.

Replacement: will link in the next comment once GitHub returns the new PR URL.

@gcarleo gcarleo closed this Mar 20, 2026
@gcarleo
Copy link
Author

gcarleo commented Mar 20, 2026

Replacement PR: #42

This one is based directly on microsoft/main and contains only the bind-params compatibility fix plus its regression test, so it avoids the unrelated fork-divergence conflicts.

@gcarleo gcarleo deleted the codex/fix-get-bind-params branch March 21, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants