Skip to content

Commit 786ee8d

Browse files
Merge pull request #895 from SciML/Vaibhavdixit02-patch-1
Update OptimizationOptimJL.jl
2 parents 0436a19 + d9a1f19 commit 786ee8d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/OptimizationOptimJL/src/OptimizationOptimJL.jl

+5-4
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ function __map_optimizer_args(cache::OptimizationCache,
3838
abstol::Union{Number, Nothing} = nothing,
3939
reltol::Union{Number, Nothing} = nothing,
4040
kwargs...)
41-
if !isnothing(abstol)
42-
@warn "common abstol is currently not used by $(opt)"
43-
end
4441

4542
mapped_args = (; extended_trace = true, kwargs...)
4643

44+
if !isnothing(abstol)
45+
mapped_args = (; mapped_args..., f_abstol = abstol)
46+
end
47+
4748
if !isnothing(callback)
4849
mapped_args = (; mapped_args..., callback = callback)
4950
end
@@ -72,7 +73,7 @@ function __map_optimizer_args(cache::OptimizationCache,
7273
end
7374

7475
if !isnothing(reltol)
75-
mapped_args = (; mapped_args..., f_tol = reltol)
76+
mapped_args = (; mapped_args..., f_reltol = reltol)
7677
end
7778

7879
return Optim.Options(; mapped_args...)

0 commit comments

Comments
 (0)