-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Still problems with the docu #641
Comments
Yes sorry about that. I forgot to enable strict doctesting so the doctest "passed" while the example failed 😅 . Should be fixed in #622, along with being appropriately tested. |
Fixed. |
Hello Chris, thanks for taking a look at the problem. Unfortunately i still have the same error when running the code. I use Julia 1.7.3 with the following packages: Maybe it is trivial, but can you tell me what i am doing wrong? |
You ran this one verbatim? https://sensitivity.sciml.ai/dev/ode_fitting/optimization_ode/ |
Hi Chris, Thank you so much for the support!!! |
Thanks for noticing that. Interesting that the doctests didn't catch that. I'll have to find out how to make that caught by the tests. |
For me it seems to work without the additional import, but I have: |
Hello again,
this question is related to one already posted by me. Since the old topic was closed but the error changed and i am not sure if somebody will see it then, i created this one. Also, it seems to be that i am not the only one with this problem. So initially i have been running the code from https://sensitivity.sciml.ai/dev/ode_fitting/optimization_ode/. This created an error that AutoZygote is not found. By including DiffEqSensitivity and Zygote, the error now changes as you can see below. I know that Chris has this probably on his radar and that he is working on it, but wanted to post it here anyways.
ERROR: LoadError: MethodError: no method matching Optim.Options(; extended_trace=true, cb=var"#1#2"(), callback=OptimizationOptimJL.var"#_cb#11"{OptimizationOptimJL.var"#10#18", BFGS{LineSearches.InitialStatic{Float64}, LineSearches.HagerZhang{Float64, Base.RefValue{Bool}}, Nothing, Float64, Flat}, Base.Iterators.Cycle{Tuple{Optimization.NullData}}}(OptimizationOptimJL.var"#10#18"(), BFGS{LineSearches.InitialStatic{Float64}, LineSearches.HagerZhang{Float64, Base.RefValue{Bool}}, Nothing, Float64, Flat}(LineSearches.InitialStatic{Float64}
alpha: Float64 1.0
scaled: Bool false
, LineSearches.HagerZhang{Float64, Base.RefValue{Bool}}
delta: Float64 0.1
sigma: Float64 0.9
alphamax: Float64 Inf
rho: Float64 5.0
epsilon: Float64 1.0e-6
gamma: Float64 0.66
linesearchmax: Int64 50
psi3: Float64 0.1
display: Int64 0
mayterminate: Base.RefValue{Bool}
, nothing, 0.01, Flat()), Base.Iterators.Cycle{Tuple{Optimization.NullData}}((Optimization.NullData(),)), Core.Box(#undef), Core.Box(Optimization.NullData()), Core.Box(2)), iterations=100)
Closest candidates are:
Optim.Options(; x_tol, f_tol, g_tol, x_abstol, x_reltol, f_abstol, f_reltol, g_abstol, g_reltol, outer_x_tol, outer_f_tol, outer_g_tol, outer_x_abstol, outer_x_reltol, outer_f_abstol, outer_f_reltol, outer_g_abstol, outer_g_reltol, f_calls_limit, g_calls_limit, h_calls_limit, allow_f_increases, allow_outer_f_increases, successive_f_tol, iterations, outer_iterations, store_trace, trace_simplex, show_trace, extended_trace, show_every, callback, time_limit) at ~/.julia/packages/Optim/6Lpjy/src/types.jl:73 got unsupported keyword argument "cb"
Optim.Options(::T, ::T, ::T, ::T, ::T, ::T, ::T, ::T, ::T, ::T, ::T, ::T, ::Int64, ::Int64, ::Int64, ::Bool, ::Bool, ::Int64, ::Int64, ::Int64, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::TCallback, ::Float64) where {T, TCallback} at ~/.julia/packages/Optim/6Lpjy/src/types.jl:44 got unsupported keyword arguments "extended_trace", "cb", "callback", "iterations"
Stacktrace:
[1] kwerr(kw::NamedTuple{(:extended_trace, :cb, :callback, :iterations), Tuple{Bool, var"#1#2", OptimizationOptimJL.var"#_cb#11"{OptimizationOptimJL.var"#10#18", BFGS{LineSearches.InitialStatic{Float64}, LineSearches.HagerZhang{Float64, Base.RefValue{Bool}}, Nothing, Float64, Flat}, Base.Iterators.Cycle{Tuple{Optimization.NullData}}}, Int64}}, args::Type)
@ Base ./error.jl:163
[2] __map_optimizer_args(prob::OptimizationProblem{true, OptimizationFunction{true, Optimization.AutoZygote, var"#3#4", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Float64}, SciMLBase.NullParameters, Nothing, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, opt::BFGS{LineSearches.InitialStatic{Float64}, LineSearches.HagerZhang{Float64, Base.RefValue{Bool}}, Nothing, Float64, Flat}; callback::Function, maxiters::Int64, maxtime::Nothing, abstol::Nothing, reltol::Nothing, kwargs::Base.Pairs{Symbol, var"#1#2", Tuple{Symbol}, NamedTuple{(:cb,), Tuple{var"#1#2"}}})
@ OptimizationOptimJL ~/.julia/packages/OptimizationOptimJL/fdrJg/src/OptimizationOptimJL.jl:37
[3] ___solve(prob::OptimizationProblem{true, OptimizationFunction{true, Optimization.AutoZygote, var"#3#4", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Float64}, SciMLBase.NullParameters, Nothing, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, opt::BFGS{LineSearches.InitialStatic{Float64}, LineSearches.HagerZhang{Float64, Base.RefValue{Bool}}, Nothing, Float64, Flat}, data::Base.Iterators.Cycle{Tuple{Optimization.NullData}}; callback::Function, maxiters::Int64, maxtime::Nothing, abstol::Nothing, reltol::Nothing, progress::Bool, kwargs::Base.Pairs{Symbol, var"#1#2", Tuple{Symbol}, NamedTuple{(:cb,), Tuple{var"#1#2"}}})
@ OptimizationOptimJL ~/.julia/packages/OptimizationOptimJL/fdrJg/src/OptimizationOptimJL.jl:140
[4] __solve(prob::OptimizationProblem{true, OptimizationFunction{true, Optimization.AutoZygote, var"#3#4", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Float64}, SciMLBase.NullParameters, Nothing, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, opt::BFGS{LineSearches.InitialStatic{Float64}, LineSearches.HagerZhang{Float64, Base.RefValue{Bool}}, Nothing, Float64, Flat}, data::Base.Iterators.Cycle{Tuple{Optimization.NullData}}; kwargs::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:maxiters, :cb), Tuple{Int64, var"#1#2"}}})
@ OptimizationOptimJL ~/.julia/packages/OptimizationOptimJL/fdrJg/src/OptimizationOptimJL.jl:56
[5] solve(::OptimizationProblem{true, OptimizationFunction{true, Optimization.AutoZygote, var"#3#4", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Float64}, SciMLBase.NullParameters, Nothing, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, ::BFGS{LineSearches.InitialStatic{Float64}, LineSearches.HagerZhang{Float64, Base.RefValue{Bool}}, Nothing, Float64, Flat}; kwargs::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:maxiters, :cb), Tuple{Int64, var"#1#2"}}})
@ SciMLBase ~/.julia/packages/SciMLBase/UEAKN/src/solve.jl:56
[6] __solve(::OptimizationProblem{true, OptimizationFunction{true, Optimization.AutoZygote, var"#3#4", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Float64}, SciMLBase.NullParameters, Nothing, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, ::PolyOpt; maxiters::Int64, kwargs::Base.Pairs{Symbol, var"#1#2", Tuple{Symbol}, NamedTuple{(:cb,), Tuple{var"#1#2"}}})
@ OptimizationPolyalgorithms ~/.julia/packages/OptimizationPolyalgorithms/5gDHf/src/OptimizationPolyalgorithms.jl:29
[7] #solve#492
@ ~/.julia/packages/SciMLBase/UEAKN/src/solve.jl:56 [inlined]
[8] top-level scope
@ ~/Documents/julia_GPU_solver/Optimization_Test.jl:49
in expression starting at /Users/malmansto/Documents/julia_GPU_solver/Optimization_Test.jl:49
The text was updated successfully, but these errors were encountered: