Skip to content

Conversation

kellertuer
Copy link

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.

  • 3 tests are not yet passing again but the error messages are so long I struggle a bit with even reading them
  • there is a few things I do not understand. I marked them with TODO and will add comments here later
  • documentation should be checked, especially the SPD example is too complicated and bogus.
  • What code formatter is used now here?
  • do we care about test coverage?
  • if we wait a bit for Introduce 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 ?)

Comment on lines +234 to 239
# TODO: WHY? they both still accept not passing it
function SciMLBase.requireshessian(opt::Union{
AdaptiveRegularizationCubicOptimizer, TrustRegionsOptimizer})
true
end

Copy link
Author

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
Copy link
Author

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}?

Comment on lines +323 to 324
#TODO: What is this callback for?
cb_call = cache.callback(opt_state, x...)
Copy link
Author

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?

Comment on lines +354 to 356
# 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)
Copy link
Author

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?

@kellertuer
Copy link
Author

Currently:

  • both ARC and TR fail, something with the Hessian maybe (not yet had the time to scroll through the kilometres of the error message
  • I am not sure how ConvexBundle ever worked, since a subsolver is only available if one also loads RipQP
  • the SPD example fails, but that one I plan to replace anyways, since it is an overcomplicated one that is not a good one to run tests on – or in other words there are much better suited ones on SPDs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant