Skip to content

Commit e01eb77

Browse files
test: fix sensealg and confusing error message
1 parent d3b1669 commit e01eb77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/parameter_initialization.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,17 @@ tunables, repack, _ = SS.canonicalize(SS.Tunable(), parameter_values(prob))
7979
end
8080

8181
@testset "Adjoint through Prob" begin
82+
sensealg = SciMLSensitivity.GaussAdjoint(autojacvec = SciMLSensitivity.ZygoteVJP())
8283
gs_prob, = Zygote.gradient(tunables) do tunables
8384
new_prob = remake(prob; p = repack(tunables))
84-
sol = solve(prob; sensealg)
85+
sol = solve(new_prob; sensealg)
8586
sum(sol)
8687
end
8788
@test any(!iszero, gs_prob)
8889

8990
gs_prob, = Zygote.gradient(tunables) do tunables
9091
new_prob = remake(prob; p = repack(tunables))
91-
sol = solve(new_prob, sensealg = sensealg)
92+
sol = solve(new_prob; sensealg)
9293
o = sol[w]
9394
o[1]
9495
end

0 commit comments

Comments
 (0)