Skip to content

Commit c85dfa2

Browse files
chore: gix commit history mixup
1 parent c4178b1 commit c85dfa2

File tree

4 files changed

+9
-21
lines changed

4 files changed

+9
-21
lines changed

ext/SciMLBaseChainRulesCoreExt.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ end
5858

5959
function ChainRulesCore.rrule(::Type{ODEProblem}, args...; kwargs...)
6060
function ODEProblemAdjoint(ȳ)
61-
@show "some con"
6261
(NoTangent(), ȳ.f, ȳ.u0, ȳ.tspan, ȳ.p, ȳ.kwargs, ȳ.problem_type)
6362
end
6463

ext/SciMLBaseZygoteExt.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ end
305305
function back(Δ)
306306
Zygote.accum_param(__context__, val, Δ) === nothing && return
307307
if isimmutable(x)
308-
error()
309308
dx = (; Zygote.nt_nothing(x)..., pair(Val(f), Δ, x)...)
310309
(_project(x, dx), nothing)
311310
else

src/SciMLBase.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ import SciMLOperators:
4444

4545
@reexport using SciMLOperators
4646

47-
using Zygote
48-
4947
function __solve end
5048
function __init end
5149

src/remake.jl

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ function remake(prob::ODEProblem; f = missing,
262262
else
263263
ODEProblem{iip}(f, newu0, tspan, newp, prob.problem_type; kwargs...)
264264
end
265+
@show typeof(prob)
265266

266267
u0, p = maybe_eager_initialize_problem(prob, initialization_data, lazy_initialization)
267268
@reset prob.u0 = u0
@@ -703,8 +704,6 @@ function remake(prob::NonlinearProblem;
703704
if problem_type === missing
704705
problem_type = prob.problem_type
705706
end
706-
# error()
707-
# @show f
708707

709708
prob = if kwargs === missing
710709
NonlinearProblem{isinplace(prob)}(f = f, u0 = newu0, p = newp,
@@ -1208,25 +1207,18 @@ function maybe_eager_initialize_problem(prob::AbstractSciMLProblem, initializati
12081207
if lazy_initialization === nothing
12091208
lazy_initialization = !is_trivial_initialization(initialization_data)
12101209
end
1211-
cond = initialization_data !== nothing && !lazy_initialization &&
1212-
(!is_time_dependent(prob) || current_time(prob) !== nothing)
1213-
@show cond
1214-
if cond
1215-
# @show "in maybe_eager_initialize_problem"
1210+
if initialization_data !== nothing && !lazy_initialization &&
1211+
(!is_time_dependent(prob) || current_time(prob) !== nothing)
12161212
u0, p, _ = get_initial_values(
12171213
prob, prob, prob.f, OverrideInit(), Val(isinplace(prob)))
1218-
# if u0 !== nothing && eltype(u0) == Any && isempty(u0)
1219-
# u0 = nothing
1220-
# end
1214+
if u0 !== nothing && eltype(u0) == Any && isempty(u0)
1215+
u0 = nothing
1216+
end
12211217
else
1222-
u02 = state_values(prob)
1223-
p2 = parameter_values(prob)
1218+
u0 = state_values(prob)
1219+
p = parameter_values(prob)
12241220
end
1225-
# @show p
1226-
1227-
u03 = cond ? u0 : u02
1228-
p3 = cond ? p : p2
1229-
return u03, p3
1221+
return u0, p
12301222
end
12311223

12321224
function remake(thing::AbstractJumpProblem; kwargs...)

0 commit comments

Comments
 (0)