Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/OptimizationOptimJL/src/OptimizationOptimJL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ function __map_optimizer_args(cache::OptimizationCache,
abstol::Union{Number, Nothing} = nothing,
reltol::Union{Number, Nothing} = nothing,
kwargs...)
if !isnothing(abstol)
@warn "common abstol is currently not used by $(opt)"
end

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

if !isnothing(abstol)
mapped_args = (; mapped_args..., f_abstol = reltol)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! Should it be f_abstol = abstol here?

end

if !isnothing(callback)
mapped_args = (; mapped_args..., callback = callback)
end
Expand Down Expand Up @@ -72,7 +73,7 @@ function __map_optimizer_args(cache::OptimizationCache,
end

if !isnothing(reltol)
mapped_args = (; mapped_args..., f_tol = reltol)
mapped_args = (; mapped_args..., f_reltol = reltol)
end

return Optim.Options(; mapped_args...)
Expand Down
Loading