Repository navigation
Conversation
Partial derivatives of a symbolic `NDInterpolation`, e.g. a ModelingToolkit callable parameter, expand to `NDPartialDerivative(orders)(itp, args...)`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
could we merge this? I could really use it |
Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a1983e-5145-77e1-bbb9-789c0675687e, reviewed head a1ca7a8
Review written by the reviewer named above in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands. Summary: Registers coordinate derivatives of symbolic NDInterpolation callables, including repeated derivatives and array shapes, and raises the Symbolics minimum to 7.42. The added tests pass on the head and fail on the merge-base, but an independent analytic probe exposes an exception when differentiating an array component again after substituting a concrete interpolation. Blast radius: Symbolics extension, symbolic callable partial derivatives, shape/type propagation, substitution and generated derivative functions; numeric interpolation kernels are unchanged. Evidence: Julia 1.13.2, Symbolics 7.42.0 and SymbolicUtils 4.54.0: head extension file passes 40/40 assertions; the identical file against merge-base 3093d8d passes the 23 existing assertions, then the new scalar symbolic testset reports 4 passes, 3 failures and 5 errors. The analytic probe passes 74 assertions and errors on a matrix mixed derivative after substitution. The draft PR reports no CI checks; the recent main-branch Tests run is successful. Blocking findings
Non-blocking findingsNone. What I ranAll three Julia processes ran sequentially with Git inspection commands (exit 0): git -C src fetch origin '+refs/pull/105/head:refs/remotes/pr/105' main
git -C src checkout --detach pr/105
git -C src fetch origin '+refs/heads/main:refs/remotes/origin/main'
git -C src rev-parse HEAD origin/main
git -C src diff origin/main...HEAD
git -C src merge-base origin/main HEAD
git -C src diff 3093d8ddb43710d05164963ada68255fde32563c d41d499767c99a5232db1a112fb083f6f4f092ba -- .github/workflows/Tests.yml .github/workflows/Downgrade.yml .github/workflows/GPU.yml
git -C src diff --name-only 3093d8ddb43710d05164963ada68255fde32563c d41d499767c99a5232db1a112fb083f6f4f092ba
git -C src worktree add --detach ../base 3093d8ddb43710d05164963ada68255fde32563c
git -C src log -1 --format=%B a1ca7a8231b3ec4f36a54c6889e350effd5d0a99The current origin/main is the Base recorded above; regression execution uses its merge-base with the PR. The intervening main commit changes CI concurrency only. Read the extension, numeric evaluation callers, documentation and test-group wiring. Froze the diff-only assessment in INITIAL.md and created INITIAL.sha256 before reading author context. Exact Julia invocations (the environment variables above were applied to each): timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing run-head.jl
timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing run-base.jl
timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing probe.jl
Remote inspection: gh pr view 105 --repo SciML/DataInterpolationsND.jl --json headRefOid,baseRefOid,baseRefName,state,isDraft,body,url,title,statusCheckRollup
gh issue view 69 --repo SciML/DataInterpolationsND.jl --json title,body,url
gh pr checks 105 --repo SciML/DataInterpolationsND.jl
gh run list --repo SciML/DataInterpolationsND.jl --branch main --event push --limit 5 --json databaseId,conclusion,headSha,url,name
gh api repos/JuliaSymbolics/Symbolics.jl/pulls/2022 --jq '{title,body,state,merged,merge_commit_sha}'PR checks exits 1 with What I did not verifyNo ModelingToolkit compilation or ODE solve of issue #69, with or without a generated Jacobian. No package-wide or downstream suites, GPU execution, ForwardDiff, other AD systems, Reactant or MPI runs; those implementations are unchanged. No Julia 1.10, other platforms, latest Symbolics, or minimum compatible SymbolicUtils matrix. The probe's planned three-input tests never executed because the preceding matrix testset errored. No second execution of any test was performed; exactly three Julia runs were used. No PR CI checks were reported to inspect, and main-branch success does not validate the changed extension. No upstream writes were made. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
Fixes #69.
Adds derivative rules for a symbolic
NDInterpolation, such as a ModelingToolkit callable parameter@parameters (itp::NDInterpolation)(..). A partial derivative becomesNDPartialDerivative(orders, shape)(itp, args...), which keepsitpas an argument so that it can stay symbolic, and has its own rule for higher orders. Rules for interpolation objects used directly are unchanged.Needs JuliaSymbolics/Symbolics.jl#2022. The Symbolics compat bound is bumped to the release containing it (7.42), and the version to 0.1.11.
Tested with new testsets in
test/Extensions/test_symbolics_ext.jl: each partial, the chain rule through both arguments, a mixed second derivative, substitution, and array output, checked numerically throughbuild_function. The MWE from #69 compiles withfully_determined = trueand solves with and withoutjac = true.🤖 Generated with Claude Code