Repository navigation
Preserve PyTrees in interpolation increments - #799
Open
resonance-null wants to merge 1 commit into
Open
resonance-null wants to merge 1 commit into
resonance-null wants to merge 1 commit into
Conversation
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.
Interpolation point evaluation supports PyTrees, but eight increment branches subtract the complete endpoint containers. A valid dictionary control therefore raises
TypeErrorbefore a controlled solve's first step; denseSolution.evaluate(t0, t1)similarly fails for PyTree states.Use the existing Equinox omega leafwise subtraction in global linear/cubic/dense interpolation and the affected local polynomial/solver interpolators. Keep endpoint selection,
left, integration direction, coefficients, point formulas and solver state unchanged. These sites share one missing PyTree operation.Validation on JAX/JAXlib 0.12.0.1 CPU:
Local interpolation admission checks use float64. Existing Dopri8 float32 roundoff, KenCarp3 strict-float32 promotion errors, some empty/custom solver-buffer arrangements and backward one-sided knot behavior remain outside this repair. The full suite, GPU/sharding, higher-order AD and performance were not tested.
I directed this work and take responsibility for the contribution and its follow-up. AI assistance was used in producing the change.