JuliaSmoothOptimizers / JuliaSmoothOptimizers/NLPModelsModifiers.jl
Error with SolverBenchmark
- Lingua principale
- Julia
- Stelle
- 9
- Fork
- 10
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I am trying to benchmark solvers on a Diagonal Quasi-Newton Model. I get two issues:
1. I get `type DiagonalQNModel has no field counters`
2. When giving a Quasi-Newton Model to Ipopt, I get `MethodError : no method matching hess_structure!(::NLPModelsModifiers.DiagonalQNModel{...},...)`
Here is an example
```
using BenchmarkTools, Dates, LinearAlgebra, JLD2
using Percival, NLPModels, NLPModelsIpopt, SolverBenchmark, SolverCore, NLPModelsModifiers
using OptimizationProblems, ADNLPModels, OptimizationProblems.ADNLPProblems
meta = OptimizationProblems.meta
problem_names = meta[(meta.has_equalities_only.==1).&(meta.has_bounds.==0).&(meta.has_fixed_variables.==0).&(meta.variable_nvar.==0), :name]
problem_list = (SpectralGradientModel(eval(Meta.parse(name))(), σ=1.0) for name in problem_names)
solvers = Dict(
:ipopt =>
nlp -> ipopt(
nlp,
),
:percival =>
nlp -> percival(
nlp,
),
)
stats = bmark_solvers(solvers, problem_list)
```
There is no reason for not having a `hess_structure!` method at least for the DiagonalQNModel type because it is trivial. I can also add the counters as a field of the different structures if you think it is appropriate.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by running the supplied SolverBenchmark example and inspect DiagonalQNModel, its counters handling, and the hess_structure! entry point. Compare the model interfaces used by bmark_solvers and Ipopt to determine the expected methods and fields. Done means the benchmark runs without the reported counters error and Ipopt accepts the quasi-Newton model.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- julia
- Ambito
- backend-api-design
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100