Remove Tracker @test_broken guards (closes #1331)#1452
Conversation
The guards in test/concrete_solve_derivatives.jl (lines 518, 548, 579,
611, 735) attributed five Tracker outer-AD failures to "Julia 1.12+",
but the actual trigger was DiffEqBase's Tracker `@grad` for `solve_up`
returning the nested `Vector{Vector{Float64}}` for an `ODESolution`
after RecursiveArrayTools v4 made `AbstractVectorOfArray <: AbstractArray`.
Tracker tracked the vector-of-vectors directly, and `sum(solve(...))`
reduced element-wise into a vector instead of a scalar, hitting
"Function output is not scalar" in `Tracker.gradient`'s losscheck.
DiffEqBase v7.5.1 (SciML/OrdinaryDiffEq.jl#3663) stacks
`AbstractVectorOfArray` returns into a flat matrix before tracking,
restoring the pre-RAT-v4 behavior. With that fix the five originally
failing tests (`save_idxs`, `save_everystep=false`, non-integer
`saveat=2.3`, `VecOfArray`, `BouncingBall`) pass on Julia 1.12.6 with
Tracker 0.2.38. Bump DiffEqBase compat to 7.5.1 and drop the guards.
Closes SciML#1331.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Local verification on Julia 1.12.6 + this PR branch ( What I foundPR SciML/OrdinaryDiffEq.jl#3665 (merged 2026-05-21T13:48Z, released as DiffEqBase 7.5.1 at 14:08Z) was supposed to add a new - return convert(AbstractArray, sol), pb_f
+ return sol, pb_fUnder RAT v4, Reproduction with the released 7.5.1Smoke MWE ( This PR's first testset ( Proposed path forwardI've opened SciML/OrdinaryDiffEq.jl#3666, which restores the dropped
So:
Recommend holding merge of this PR until 7.5.2 is released. /cc @ChrisRackauckas |
DiffEqBase 7.5.5 restores the AbstractVectorOfArray branch in the Tracker @Grad for solve_up, which is what makes the five previously-@test_broken Tracker testsets pass under RecursiveArrayTools v4. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Please ignore until reviewed by @ChrisRackauckas.
Depends on SciML/OrdinaryDiffEq.jl#3663 (DiffEqBase v7.5.1). This PR will fail CI until that PR is merged and a new DiffEqBase patch is tagged.
Closes #1331.
Summary
if backend_name == "Tracker" && VERSION >= v"1.12"; @test_broken false; continue; endguards intest/concrete_solve_derivatives.jl(save_idxs,save_everystep=false, non-integersaveat=2.3,VecOfArray,BouncingBall).7.5.1.The issue was filed as "Tracker fails on Julia 1.12+", but the actual trigger is the RecursiveArrayTools v4 supertype change (
AbstractVectorOfArray <: AbstractArray). On RAT v3, the Tracker@gradforsolve_upfell through toconvert(AbstractArray, sol)whichstack'dsol.uinto a flat matrix. On RAT v4, the newsol isa AbstractArraybranch ships the nestedVector{Vector{Float64}}to Tracker, andsum(solve(...))reduces element-wise into a vector, trippingTracker.gradient's "Function output is not scalar" check. Full diagnosis on #1331.The fix lives in DiffEqBase (SciML/OrdinaryDiffEq.jl#3663); this PR is the test-side cleanup confirming the previously-broken tests now pass.
Verification
With the DiffEqBase patch applied locally on Julia 1.12.6 / Tracker 0.2.38 / RAT 4.3.0:
Test plan
@test_broken.