JuliaSmoothOptimizers / SolverBenchmark.jl

Benchmark tools for solvers
Other
23 stars 10 forks source link

Add a column `solver name` in the logs of `bmark_solvers` #154

Closed tmigot closed 5 months ago

tmigot commented 7 months ago

This was initiated in #150 and discussed in #153 .

The line that prints after each problem: https://github.com/JuliaSmoothOptimizers/SolverBenchmark.jl/blob/bbec05989ff2a1e06e7e5d9f0db0d3aebe6b9310/src/run_solver.jl#L127

MWE

using NLPModelsTest
using DataFrames, SolverCore, SolverBenchmark

function newton(nlp)
stats = GenericExecutionStats(nlp)
set_solver_specific!(stats, Symbol("isConvex"), :is_convex)
return stats
end
lbfgs(nlp) = newton(nlp)

solvers = Dict(
    :Newton => newton,
    :LBFGS => lbfgs
)
problems = [NLPModelsTest.BROWNDEN()]
stats = bmark_solvers(solvers, problems)
Jay-sanjay commented 7 months ago

HI @tmigot I was trying to tackle this issue and trying something like this

          info_hdr_override = merge(info_hdr_override, Dict(:solver => s.solver_name))
          @info log_header(colstats, types[col_idx], hdr_override = info_hdr_override)

Is it the way, or what other things I need to handle ?

tmigot commented 7 months ago

Hi @Jay-sanjay ! Thanks for the suggestion, actualy, there is an ongoing PR to fix this but the link wasn't done.