Remove lineax dependency#697
Open
marcocuturi wants to merge 3 commits into
Open
Conversation
Replace all lineax usage with plain JAX operations: - lineax_implicit.py: JAX-native CG via jax.lax.while_loop - regularizers.py: plain ndarray operations instead of lineax operators - Remove lineax from pyproject.toml dependencies - Update tests and docs accordingly lineax's equinox closure conversion is incompatible with JAX >= 0.10 when called inside VJP backward passes, causing 39 test failures. The JAX-native implementation avoids this entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # src/ott/solvers/linear/lineax_implicit.py
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #697 +/- ##
==========================================
- Coverage 86.88% 86.88% -0.01%
==========================================
Files 83 83
Lines 8656 8653 -3
Branches 593 593
==========================================
- Hits 7521 7518 -3
Misses 983 983
Partials 152 152
🚀 New features to boost your workflow:
|
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.
Summary
jax.lax.while_loop) in implicit differentiationregularizers.pywith plainjnp.ndarrayoperationslineaxfrom project dependenciesMotivation
lineax uses equinox's
filter_closure_convertwhich produces jaxpr/consts mismatches when called inside VJP backward passes on JAX >= 0.10. This caused 39 test failures insinkhorn_diff_test.py. The JAX-native CG implementation works correctly under all JAX transformations.Test plan
sinkhorn_diff_test.pytests pass locallyregularizers_test.pytests passsoft_sort_test.pyandpotentials_test.pytests pass🤖 Generated with Claude Code