-
-
Notifications
You must be signed in to change notification settings - Fork 101
Improve the OptimizationManopt.jl interface #1009
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
base: master
Are you sure you want to change the base?
Conversation
# TODO: WHY? they both still accept not passing it | ||
function SciMLBase.requireshessian(opt::Union{ | ||
AdaptiveRegularizationCubicOptimizer, TrustRegionsOptimizer}) | ||
true | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this function defined and what is it for?
The current definition here is not correct, both ARC and TR can perform their own (actually quite good) approximation of the hessian – similar to what QN does.
So they do not need a Hessian, but the exact one of course performs a bit better than the approximate one.
@@ -356,6 +257,7 @@ function build_gradF(f::OptimizationFunction{true}) | |||
f.grad(G, θ) | |||
return riemannian_gradient(M, θ, G) | |||
end | |||
return g | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where can I find more information about this? Especially what is the parameter {true}
?
#TODO: What is this callback for? | ||
cb_call = cache.callback(opt_state, x...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this callback, what is it used for and why is this here?
# TODO: With the new keyword warnings we can not just always pass down hessF! | ||
opt_res = call_manopt_optimizer(manifold, cache.opt, _loss, gradF, cache.u0; | ||
solver_kwarg..., stopping_criterion = stopping_criterion, hessF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Manopt 0.5.22 this will in most cases warn if not error to pass a Hessian as a keyword argument to a solver that does not accept hessians. So this has to be reworked. How does Optimization.jl usually handle that some things are only used for some solvers?
Currently:
|
I sat down for about an hour and looked more seriously at the interface.
The old form had a bit too much of clutter in.
This should close #906 and #944. We could also check #814 on this branch a bit closer.
has_converged
JuliaManifolds/Manopt.jl#511 (to be merged soon), we can even resolve that currently Optimization.jl always claims solver runs with Manopt failed./cc @Vaibhavdixit02 @oscardssmith (maybe @ChrisRackauckas ?)