From 50105e10647d8d1833b8c59895c4c4f9f885b67a Mon Sep 17 00:00:00 2001 From: DhairyaLGandhi Date: Mon, 28 Apr 2025 16:35:42 +0530 Subject: [PATCH] chore: rm literal_getproperty(::EnsembleSolution) --- ext/SciMLBaseZygoteExt.jl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ext/SciMLBaseZygoteExt.jl b/ext/SciMLBaseZygoteExt.jl index 9b52872b8..45a8e0f63 100644 --- a/ext/SciMLBaseZygoteExt.jl +++ b/ext/SciMLBaseZygoteExt.jl @@ -70,6 +70,9 @@ end function EnsembleSolution_adjoint(p̄::EnsembleSolution) (p̄, nothing, nothing, nothing) end + function EnsembleSolution_adjoint(p̄::NamedTuple) + (p̄.u, nothing, nothing, nothing) + end out, EnsembleSolution_adjoint end @@ -82,11 +85,6 @@ end VA[:, i], ODESolution_getindex_pullback end -@adjoint function Zygote.literal_getproperty(sim::EnsembleSolution, - ::Val{:u}) - sim.u, p̄ -> (EnsembleSolution(p̄, 0.0, true, sim.stats),) -end - @adjoint function Base.getindex(VA::ODESolution, sym) function ODESolution_getindex_pullback(Δ) i = symbolic_type(sym) != NotSymbolic() ? variable_index(VA, sym) : sym