Skip to content

Commit 3838187

Browse files
chore: fix formatting
1 parent 89f29cf commit 3838187

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ext/SciMLBaseZygoteExt.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ end
164164

165165
@adjoint function Base.getindex(VA::SciMLBase.NonlinearSolution, sym)
166166
function NonlinearSolution_getindex_pullback(Δ)
167+
@show "in the getindwx"
167168
i = symbolic_type(sym) != NotSymbolic() ? variable_index(VA, sym) : sym
168169
if is_observed(VA, sym)
169170
f = observed(VA, sym)
@@ -176,7 +177,9 @@ end
176177
f.f_oop(u, _p)
177178
end
178179
gs = back(Δ)
179-
((u = gs[1], prob = (p = gs[2],)), nothing)
180+
# @show gs[2]
181+
# @show Δ
182+
((u = gs[1], prob = (p = (tunable = gs[2],),)), nothing)
180183
elseif i === nothing
181184
throw(error("Zygote AD of purely-symbolic slicing for observed quantities is not yet supported. Work around this by using `A[sym,i]` to access each element sequentially in the function being differentiated."))
182185
else

test/downstream/observables_autodiff.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ end
5252
# gs, = gradient(isol) do isol
5353
# isol[w]
5454
# end
55-
55+
5656
# end
5757

5858
# DAE

0 commit comments

Comments
 (0)