Repository navigation
Test approx_df cubic2 inside shard_map - #210
Merged
Merged
Conversation
Values mapped over a shard_map axis with unmapped knots used to fail in the
lineax solve ("Vector and operator structures do not match"). The tridiagonal
solve from v0.3.16 handles it; this pins that for every bc_type.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #210 +/- ##
=======================================
Coverage 98.35% 98.35%
=======================================
Files 8 8
Lines 1699 1699
=======================================
Hits 1671 1671
Misses 28 28 🚀 New features to boost your workflow:
|
jax.shard_map arrived in jax 0.6.1, below which the test raised AttributeError. Also say what triggers the old failure: f entering shard_map as an input while x is closed over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The old lineax failure only shows with jax >= 0.8, where the right-hand side carries the manual mesh sharding. Pass axis=0 by keyword and say why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f0uriest
approved these changes
Nov 24, 2026
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.
Adds a regression test that runs
approx_df(..., "cubic2")insidejax.shard_map, with the values passed in as ashard_mapinput and the knots closed over, for eachbc_type(not-a-knot, natural, clamped, periodic). It checks the result against the plainvmap. The test is skipped on jax older than 0.6.1, which has nojax.shard_map.With jax 0.8 through 0.11 (the newest v0.3.15 allows), interpax v0.3.15 raised
ValueError: Vector and operator structures do not matchhere. The lineax solve compares the operator's structure with the right-hand side's, sharding included, and from jax 0.8 the right-hand side carries the manual mesh sharding insideshard_map. The tridiagonal solve in v0.3.16 fixed it, and this test keeps it fixed on jax >= 0.8. On older jax the old code passed too, so there the test can't catch that regression. A one-device mesh is enough to trigger it, so the test runs on CPU CI.🤖 Generated with Claude Code