-
-
Notifications
You must be signed in to change notification settings - Fork 91
Issue in running OptimizationFunction #686
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
Comments
I ran the code with recent versions of the packages and it works for me? |
⌅ [7f7a1694] Optimization v3.19.3 |
Oh, you have am old SciMLBase (pre v2). @ChrisRackauckas I think that Line 53 in 5cb65c8
Edit: v2 should be required, not dropped, sorry for the confusion. (jl_8TnPqU) pkg> st
Status `C:\Users\sebastian\AppData\Local\Temp\jl_8TnPqU\Project.toml`
[f6369f11] ForwardDiff v0.10.36
⌃ [7f7a1694] Optimization v3.19.3
⌃ [0bca4576] SciMLBase v1.89.0
Info Packages marked with ⌃ have new versions available and may be upgradable. and I can reproduce the error mentioned above: julia> f = OptimizationFunction(rosenbrock, Optimization.AutoForwardDiff())
ERROR: MethodError: no method matching (OptimizationFunction{true})(::typeof(rosenbrock), ::AutoForwardDiff{nothing, Nothing})
Closest candidates are:
(OptimizationFunction{iip})(::Any; ...) where iip
@ SciMLBase C:\Users\sebastian\.julia\packages\SciMLBase\zXEYU\src\scimlfunctions.jl:3907
(OptimizationFunction{iip})(::Any, ::SciMLBase.AbstractADType; grad, hess, hv, cons, cons_j, cons_h, lag_h, hess_prototype, cons_jac_prototype, cons_hess_prototype, lag_hess_prototype, syms, paramsyms, observed, hess_colorvec, cons_jac_colorvec, cons_hess_colorvec, lag_hess_colorvec, expr, cons_expr, sys) where iip
@ SciMLBase C:\Users\sebastian\.julia\packages\SciMLBase\zXEYU\src\scimlfunctions.jl:3907
Stacktrace:
[1] OptimizationFunction(::Function, ::Vararg{Any}; kwargs::@Kwargs{})
@ SciMLBase C:\Users\sebastian\.julia\packages\SciMLBase\zXEYU\src\scimlfunctions.jl:3905
[2] top-level scope
@ REPL[15]:1 @lakshaya17 You can see what packages are holding back SciMLBase with |
Yes, that should get bumped to require v2. In fact, we need the full downgrade CI here. |
There is downgrade CI here already. Tbh I don't get the issue here, how did you end up with those versions @lakshaya17?
I am probably misunderstanding but doesn't this mean that v2 should be there and should have been used but somehow the OP ended up with <v2 and that led to the error? |
I tried that and updated the Julia version as well. Still no luck. I checked the outdated packages, and they showing me this:
With the command:
Its giving me this: [0bca4576] SciMLBase v1.98.1 (<v2.21.0): BoundaryValueDiff 8000 Eq, DiffEqBase, Integrals, ModelingToolkit, StochasticDiffEq When I am trying to update these, they are either giving me compatibility issues. |
Does just |
No. I just ran this:
|
You should restart the julia session and try this |
@Vaibhavdixit02 I ran that after restarting Julia session only. |
@Vaibhavdixit02 yeah, it should require v2 and OP somehow ended up with <v2, sorry for the confusion. @lakshaya17 what do you get if you try to explicitly |
@SebastianM-C I am getting this:
|
It looks like SciMLExpectations is holding back Integrals to a version pre SciMLBase@v2. If you don't need SciMLExpectations in this environment, removing it and updating should hopefully resolve the issue. |
I am trying to run the example in the README, but I am getting the following error:
Particularly I am running this code:
I would be obliged if someone could help me with the same.
Regards
The text was updated successfully, but these errors were encountered: