JSO-compliance definition #38
Replies: 1 comment 2 replies
-
|
Hi @abelsiqueira ! I think we should have a place with a detailed tutorial that goes beyond the "takes an NLP, returns a Stats", what do you think? We could do it as a JSOTutorials.jl and maybe have a template for JSO-compliant solver !? I think you have a quite complete list of what exists. The only update I would see is adding a structure for the parameters. Essentially, we wait 3 things for a JSO-compliant solver:
This behavior is tested, but maybe not extensively documented. About your suggestion of Change to solve!(stats, nlp, solver), I am fine with it. Feel free to open an issue or a PR on SolverCore and I can help propagate this. I am not too fond of storing the output inside the solver, but this is what is done in Krylov.jl. It has the merit of avoiding storing twice the solution. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
JSO-compliant definition is currently very loose:
But we assume some additional things from our solvers, which we should include to JSO-compliance, at least as optional but desired features.
We should also define this somewhere and always link back to it. Most mentions of JSO-compliance outside of that blog don't explicitly define it.
Some formal description would be useful.
Here are some things I think are already in place:
SolverName <: SolverCore.AbstractOptimizationSolver. Maybe more specificallySolver{T, V, ...}, for typeTand vector typeV?SolverName(nlp; kwargs...)solve!(solver, nlp, stats; kwargs...)such that:x,atol,rtol,max_eval,max_iter,max_time,callback,verbose.callback = (nlp, solver, stats) -> nothingis called right before the end of the loop.solver_name(nlp; kwargs...)that callsSolverName(nlp; kwargs...)and thensolve!(solver, nlp; kwargs...)reset!(solver), which resets specific things (maybe not part of compliance)reset!(solver, nlp), which is also available, I think because of QuasiNewtonModels? (maybe not part of compliance)Here are some suggestions:
SolverNameshould have a fieldx::Vfor the iterate.solve!(stats, nlp, solver), since thestatswill be modified (althoughsolveris modified too, it is not an "output", in the sense that all stored data should not be trusted).Questions/Issues:
outputinsidesolver? It is starting to feel too OOP.xis currently stored insidesolverandoutput(calledsolutionthere). I say we move it tooutputonly, specially sincesolve!now requiresstats.reset!is only useful for the solver itself, right? Probably shouldn't be part of compliance if that is the case.solve!(stats, nlp, solver)twice in a row (no kwargs).Beta Was this translation helpful? Give feedback.
All reactions