You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/introduction-to-solverbenchmark/index.jmd
+24-23Lines changed: 24 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -223,32 +223,33 @@ Here is a useful tutorial on how to use the benchmark with specific solver:
223
223
The tutorial covers how to use the problems from `OptimizationProblems` to run a benchmark for unconstrained optimization.
224
224
225
225
## Handling `solver_specific` in benchmark runs
226
+
If a solver's execution-stats object contains a `solver_specific` dictionary
227
+
(accessible as `s.solver_specific`), `solve_problems` will create columns for
228
+
each key in that dictionary in the per-solver `DataFrame`. (Note: `bmark_solvers`
229
+
forwards keyword arguments to each solver, so ensure your solver wrapper populates
230
+
`s.solver_specific` if you want those columns.)
226
231
227
-
`SolverBenchmark` accepts solver-specific options via the keyword argument `solver_specific` on benchmarking functions (for example, when calling the high-level benchmarking helpers such as `bmark_solvers`).
228
-
229
-
- `solver_specific` is a mapping that associates a solver identifier (typically a `Symbol` or the solver name you use in the benchmark) with a dictionary of options specific to that solver implementation.
230
-
- Those options are passed through to the solver when the run is executed and are recorded as part of the run metadata.
231
-
- As a result, runs that differ only by solver-specific options are treated as distinct entries in the benchmark results; you can group, filter or compare them in the produced `DataFrame`s.
232
-
232
+
Here is a example showing how to set a solver-specific flag and then access it for tabulation:
233
233
```julia
234
-
using SolverBenchmark, NLPModelsTest, JSOSolvers
235
-
236
-
solver_specific = Dict(
237
-
:IPOPT => Dict("tol" => 1e-8, "max_iter" => 200),
238
-
:KNITRO => Dict("maxit" => 500)
239
-
)
234
+
using NLPModelsTest, DataFrames, SolverCore, SolverBenchmark
0 commit comments