-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Optimization.LBFGS() can not compute the gradient #744
Comments
SciML/OptimizationBase.jl#43 is the solution. Maybe try that branch and see? |
Thanks, Chris. I got an error:
The followings are the packages I'm uisng:
|
Well that's progress. Why |
Interesting.
This error only occurs when I call And, the solution from optimization did not change. |
I think the next step here in improving Enzyme support is finishing up the DifferentiationInterface integration. We're working with @gdalle on this, I'm thinking it may not take more than 2 more weeks. When that's the case, DI will be used as the AD system within Optimization.jl. That means isolating this bug is simpler, as it isolates it to how DI handles Enzyme, which should be improved. If there is still an error, this becomes an Enzyme+DI issue which is something we can solve there. |
Can you try with newer versions? Without a MWE this won't be possible to be worked on |
So that aged well 🤣 |
Hi @Vaibhavdixit02, I tested the newer version with the example in DJUICE.jl/test/testoptimization.jl, got an error as below. However, as you can see in this example, Enzyme
|
Was this completed? |
Does your function contain caches? |
Well, I get the same error with the pure Enzyme call
You do have Enzyme bounded to v0.12 in DJUICE.jl and I bumped it to use the latest versions to ensure I am matching the same things |
Hi, I'm using Optimization.jl in my package: DJUICE.jl to optimize a cost function. The example is here
After optimization, the solution is the same as my initial guess. I computed the gradient directly using Enzyme here
But, when comparing with the evaluation from Optimization.jl
sol.cache.f.grad(∂J_∂α, prob.u0, prob.p)
I got error messages
The text was updated successfully, but these errors were encountered: