Skip to content

Commit 4163f6a

Browse files
Merge pull request #1006 from AayushSabharwal/as/fix-warn
fix: fix depwarn in `EnsembleProblem` constructor
2 parents 42cdf6a + 038a6e6 commit 4163f6a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/ensemble/basic_ensemble_solve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ tighten_container_eltype(u) = u
138138
function __solve(prob::EnsembleProblem{<:AbstractVector{<:AbstractSciMLProblem}},
139139
alg::Union{AbstractDEAlgorithm, Nothing},
140140
ensemblealg::BasicEnsembleAlgorithm; kwargs...)
141-
warn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel
142-
Ensembles Simulations Interface page for more details")
141+
Base.depwarn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel
142+
Ensembles Simulations Interface page for more details", :EnsembleProblemSolve)
143143
invoke(__solve, Tuple{AbstractEnsembleProblem, typeof(alg), typeof(ensemblealg)},
144144
prob, alg, ensemblealg; trajectories = length(prob.prob), kwargs...)
145145
end

src/ensemble/ensemble_problems.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ DEFAULT_OUTPUT_FUNC(sol, i) = (sol, false)
9595
DEFAULT_REDUCTION(u, data, I) = append!(u, data), false
9696
DEFAULT_VECTOR_PROB_FUNC(prob, i, repeat) = prob[i]
9797
function EnsembleProblem(prob::AbstractVector{<:AbstractSciMLProblem}; kwargs...)
98-
warn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel
99-
Ensembles Simulations Interface page for more details")
98+
Base.depwarn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel
99+
Ensembles Simulations Interface page for more details", :EnsembleProblem)
100100
invoke(EnsembleProblem,
101101
Tuple{Any},
102102
prob;
@@ -128,8 +128,8 @@ end
128128
#since NonlinearProblem might want to use this dispatch as well
129129
function SciMLBase.EnsembleProblem(
130130
prob::AbstractSciMLProblem, u0s::Vector{Vector{T}}; kwargs...) where {T}
131-
warn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel
132-
Ensembles Simulations Interface page for more details")
131+
Base.depwarn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel
132+
Ensembles Simulations Interface page for more details", :EnsebleProblem)
133133
prob_func = (prob, i, repeat = nothing) -> remake(prob, u0 = u0s[i])
134134
return SciMLBase.EnsembleProblem(prob; prob_func, kwargs...)
135135
end

0 commit comments

Comments
 (0)