JuliaNLSolvers / Optim.jl

Optimization functions for Julia
Other
1.11k stars 213 forks source link

Get rid of Manifold abstract supertype? #1017

Open jecs opened 1 year ago

jecs commented 1 year ago

Hi, I was trying out the manifold functionality in Optim.jl. It's nifty. However, I noticed that in order to use it, you need to not only define the methods retract! and project_tangent! but also need to subtype the abstract Manifold type.

Is it really necessary to subtype the Manifold type if you need to define those methods anyway? Why not drop that requirement altogether, similar to the way that ProximalOperators.jl only requires you to define prox! and grad!?

pkofod commented 1 year ago

That is possible, yes. Abstract types can be useful for fallbacks, but that's probably not too relevant as you say, as you have to define the manifold specific methods anyway.

pkofod commented 1 year ago

It might be used for dispatch at a higher level somewhere, I'm not sure.

mateuszbaran commented 1 year ago

I think the plan is to transition to Manifolds.jl: https://github.com/JuliaManifolds/Manifolds.jl/issues/35 . There is more than these two functions that can be useful for manifold optimization.

kellertuer commented 1 year ago

Which manifold did you have in mind? Besides Optim transitioning to support also the manifolds as Mateusz mentioned, you might also want to check https://github.com/JuliaManifolds/Manopt.jl (disclaimer – a package I develop).