-
Notifications
You must be signed in to change notification settings - Fork 17
Description
@amontoison @dpo I must say I don't like this PR #357 . I am creating a new issue to continue the discussion.
I understand the issue that loading Hessian backends are heavy and that smart algorithms for NLS should use only the needed operations.
Before this PR, ADNPLModel implements the whole API, so it's simple for any users. Advanced users with performance needs had to know either the matrix_free keyword or specify the EmptyADBackend. It used to also be the only package that guarantee implementing the whole API.
After this PR, users have to specify the different backends to make ADNLPModels work with the rest of JSO.
For instance, these two examples would no longer work:
using ADNLPModels
using NLPModelsModifiers, NLPModelsIpopt, OptimizationProblems
nls = OptimizationProblems.ADNLPProblems.arglina(; use_nls=true)
ipopt(nls) # fails
ff_nls = FeasibilityFormNLS(nls)
ipopt(ff_nls) # fails
you would have to find the names of different backends for hess (in the first case) and hess_residual (in the second case) and choose between the different possibilities.
I am slightly surprised that the Breakage tests did not show that.
Overall, I agree that some backends should be Empty by default (like gradient), but the others ? Maybe can we extend on the keyword systems to simplify switch modes ?