Skip to content

Commit cc03eae

Browse files
committed
add types to the kwargs
1 parent e96800d commit cc03eae

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/OptimizationOptimisers/src/OptimizationOptimisers.jl

+7-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ SciMLBase.requiresgradient(opt::AbstractRule) = true
99
SciMLBase.allowsfg(opt::AbstractRule) = true
1010

1111
function SciMLBase.__init(
12-
prob::SciMLBase.OptimizationProblem, opt::AbstractRule; save_best = true,
13-
callback = (args...) -> (false), epochs = nothing,
14-
progress = false, kwargs...)
15-
return OptimizationCache(prob, opt; save_best, callback, progress, epochs,
16-
kwargs...)
12+
prob::SciMLBase.OptimizationProblem, opt::AbstractRule;
13+
callback = (args...) -> (false),
14+
epochs::Union{Number, Nothing} = nothing,
15+
maxiters::Union{Number, Nothing} = nothing,
16+
save_best::Bool = true, progress::Bool = false, kwargs...)
17+
return OptimizationCache(prob, opt; callback, epochs, maxiters,
18+
save_best, progress, kwargs...)
1719
end
1820

1921
function SciMLBase.__solve(cache::OptimizationCache{

0 commit comments

Comments
 (0)