Error in `pretty_stats` with `Vector` in the `GenericExecutionStats` specifics

Aperta
#101 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
julia
Ambito
tooling

Direzione di ricerca

Riproduci il problema con l’esempio Julia e ispeziona pretty_stats in src/formats.jl alla riga 66, dove viene segnalata la chiave DenseVector. Poi leggi solve_problems in src/run_solver.jl intorno alla riga 67 per tracciare come i valori solver_specific raggiungono l’output del benchmark; il lavoro è completato quando pretty_stats può elaborare le statistiche risultanti senza un KeyError.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

using CUTEst, NLPModels, NLPModelsIpopt, SolverBenchmark, SolverCore
#This package
using DCISolver

nmax = 100
_pnames = CUTEst.select(
  max_var = nmax, 
  min_con = 1, 
  max_con = nmax, 
  only_free_var = true, 
  only_equ_con = true, 
  objtype = 3:6
)

#Remove all the problems ending by NE as Ipopt cannot handle them.
pnamesNE = _pnames[findall(x->occursin(r"NE\b", x), _pnames)]
pnames = setdiff(_pnames, pnamesNE)
cutest_problems = (CUTEstModel(p) for p in pnames)

#Same time limit for all the solvers
max_time = 1200. #20 minutes

solvers = Dict(
  :ipopt => nlp -> ipopt(
    nlp,
    print_level = 0,
    dual_inf_tol = Inf,
    constr_viol_tol = Inf,
    compl_inf_tol = Inf,
    acceptable_iter = 0,
    max_cpu_time = max_time,
    x0 = nlp.meta.x0,
  ),
  :dcildl => nlp -> dci(
    nlp,
    nlp.meta.x0,
    linear_solver = :ldlfact,
    max_time = max_time,
    max_iter = typemax(Int64),
    max_eval = typemax(Int64),
  ),
)
stats = bmark_solvers(solvers, cutest_problems)
pretty_stats(stats[:dcildl])

returns the following error.

ERROR: KeyError: key DenseVector{Float64} not found
Stacktrace:
 [1] getindex(h::Dict{DataType, String}, key::Type)
   @ Base ./dict.jl:482
 [2] pretty_stats(io::Base.TTY, df::DataFrames.DataFrame; col_formatters::Dict{DataType, String}, hdr_override::Dict{Symbol, String}, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ SolverBenchmark ~/.julia/packages/SolverBenchmark/eOKec/src/formats.jl:66
 [3] pretty_stats(io::Base.TTY, df::DataFrames.DataFrame)
   @ SolverBenchmark ~/.julia/packages/SolverBenchmark/eOKec/src/formats.jl:42
 [4] pretty_stats(df::DataFrames.DataFrame; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ SolverBenchmark ~/.julia/packages/SolverBenchmark/eOKec/src/formats.jl:84
 [5] pretty_stats(df::DataFrames.DataFrame)
   @ SolverBenchmark ~/.julia/packages/SolverBenchmark/eOKec/src/formats.jl:84
 [6] top-level scope
   @ REPL[32]:1

My understanding is that we assume that there are no vectors in the output of the function bmark_solvers, while dci from DCISolver.jl has a vector in its stats.solver_specific. So, it looks as a bug in solve_problems function

Lingua principale
Julia
Stelle
22
Fork
12
Merge medio
2h 19m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di JuliaSmoothOptimizers/SolverBenchmark.jl

Tutte le issue di JuliaSmoothOptimizers/SolverBenchmark.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.