Skip to content

Commit 87fc243

Browse files
author
Circle CI
committed
Update docs for dev (build 4101)
1 parent 79ea95b commit 87fc243

64 files changed

Lines changed: 872 additions & 604 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dev/_sources/auto_examples/run_minimal_benchmark.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ To run the benchmark, just execute:
6868
<span style="color: #000080; text-decoration-color: #000080; font-weight: bold"> |--gd[lr=0.01]:</span> <span style="color: #808000; text-decoration-color: #808000; font-weight: bold">done (not enough run)</span>
6969
<span style="color: #008000; text-decoration-color: #008000; font-weight: bold">Saving result in: </span>
7070
<span style="color: #008000; text-decoration-color: #008000; font-weight: bold">/home/circleci/project/examples/minimal_benchmark/outputs/benchopt_run_2026-01</span>
71-
<span style="color: #008000; text-decoration-color: #008000; font-weight: bold">-14_23h54m22.parquet</span>
71+
<span style="color: #008000; text-decoration-color: #008000; font-weight: bold">-15_08h07m37.parquet</span>
7272
Processing
7373
/home/circleci/project/examples/minimal_benchmark/outputs/benchopt_run_2026-01
74-
-14_23h54m22.parquet
74+
-15_08h07m37.parquet
7575

7676

7777
</pre></div>
@@ -119,10 +119,10 @@ To get a more precise curve, you can increase ``n`` and ``r``:
119119
<span style="color: #000080; text-decoration-color: #000080; font-weight: bold"> |--gd[lr=0.01]:</span> <span style="color: #008000; text-decoration-color: #008000; font-weight: bold">done</span>
120120
<span style="color: #008000; text-decoration-color: #008000; font-weight: bold">Saving result in: </span>
121121
<span style="color: #008000; text-decoration-color: #008000; font-weight: bold">/home/circleci/project/examples/minimal_benchmark/outputs/benchopt_run_2026-01</span>
122-
<span style="color: #008000; text-decoration-color: #008000; font-weight: bold">-14_23h54m25.parquet</span>
122+
<span style="color: #008000; text-decoration-color: #008000; font-weight: bold">-15_08h07m41.parquet</span>
123123
Processing
124124
/home/circleci/project/examples/minimal_benchmark/outputs/benchopt_run_2026-01
125-
-14_23h54m25.parquet
125+
-15_08h07m41.parquet
126126

127127

128128
</pre></div>
@@ -151,7 +151,7 @@ suboptimality instead of objective value.
151151

152152
.. rst-class:: sphx-glr-timing
153153

154-
**Total running time of the script:** (0 minutes 4.252 seconds)
154+
**Total running time of the script:** (0 minutes 4.740 seconds)
155155

156156

157157
.. _sphx_glr_download_auto_examples_run_minimal_benchmark.py:

dev/_sources/auto_examples/sg_execution_times.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Computation times
88
=================
9-
**00:04.252** total execution time for 3 files **from auto_examples**:
9+
**00:04.740** total execution time for 3 files **from auto_examples**:
1010

1111
.. container::
1212

@@ -33,7 +33,7 @@ Computation times
3333
- Time
3434
- Mem (MB)
3535
* - :ref:`sphx_glr_auto_examples_run_minimal_benchmark.py` (``run_minimal_benchmark.py``)
36-
- 00:04.252
36+
- 00:04.740
3737
- 0.0
3838
* - :ref:`sphx_glr_auto_examples_plot_run_benchmark.py` (``plot_run_benchmark.py``)
3939
- 00:00.000

dev/_sources/benchmark_workflow/run_benchmark.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,42 @@ Here is the content of configuration file ``example_config.yml`` if we were to r
9090

9191
A third, less frequent, option to run a benchmark is using a Python script.
9292
Check it out on :ref:`advanced usage <run_benchmark_with_py_script>`.
93+
94+
95+
.. _run_benchmark_with_py_script:
96+
97+
Run a benchmark using a Python script
98+
-------------------------------------
99+
100+
Another way to run a benchmark is via a Python script.
101+
Typical use-cases of that are
102+
103+
- Automating the run of several benchmarks
104+
- Using ``vscode`` debugger where the python script serves as an entry point to benchopt internals
105+
106+
The following script illustrates running the :ref:`benchmark Lasso <run_with_config_file>`.
107+
It assumes that the python script is located at the same level as the benchmark folder.
108+
109+
.. code-block:: python
110+
111+
from benchopt import run_benchmark
112+
113+
114+
# run benchmark
115+
run_benchmark(
116+
benchmark_path='.',
117+
solver_names=[
118+
"skglm",
119+
"celer",
120+
"python-pgd[use_acceleration=True]",
121+
],
122+
dataset_names=[
123+
"leukemia",
124+
"simulated[n_samples=100,n_features=20]"
125+
],
126+
)
127+
128+
.. note::
129+
130+
Learn more about the different parameters supported by ``run_benchmark``
131+
function on :ref:`API references <API_ref>`.

dev/_sources/faq.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
Frequently asked questions (FAQ)
44
--------------------------------
55

6+
.. dropdown:: Can I use benchopt for ML benchmarks (not just optimization)?
7+
8+
Yes! Despite its name, Benchopt supports both **machine learning** and **optimization** benchmarks.
9+
Most features in benchopt are common to both types of benchmarks.
10+
The main difference lies in how performance is evaluated:
11+
12+
- **Optimization benchmarks**: Track iterative solvers' convergence
13+
over time and iterations.
14+
- **ML benchmarks**: Compare estimators/models on prediction tasks
15+
(accuracy, F1, etc.).
16+
17+
Setting ``sampling_strategy = "run_once"`` for a solver or for the full
18+
benchmark allows to only evaluate once to completion.
19+
See :ref:`ml_benchmark` for a complete guide, or use our
20+
`ML template <https://github.com/benchopt/template_benchmark_ml>`_ to get started quickly.
621

722
.. dropdown:: How to add my solver to an existing benchmark?
823

dev/_sources/index.rst

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77

88
|Python 3.10+| |PyPI version| |License|
99

10-
Benchopt is a benchmarking suite tailored for machine learning workflows.
11-
It is built for simplicity, transparency, and reproducibility.
12-
It is implemented in Python but can run algorithms written in many programming languages.
10+
Benchopt is a benchmarking suite tailored for **machine learning and optimization**.
11+
It makes it simple to run, publish and replicate benchmarks. The
12+
command line interface allows running various solvers on benchmark
13+
problems, providing convergence curves for iterative methods or
14+
performance comparisons for ML estimators.
1315

1416
Reproducing an existing benchmark should be as easy as running the following commands:
1517

@@ -45,24 +47,6 @@ Reproducing an existing benchmark should be as easy as running the following com
4547
which will produce a parquet file with the results that can be visualized
4648
using instruction on the ``README.md`` of the https://github.com/scikit-adaptation/skada-bench.
4749

48-
.. tab-item:: Bilevel Optimization
49-
50-
A benchmark comparing various algorithms to solve bilevel optimization problems.
51-
52-
.. prompt:: bash $
53-
54-
git clone https://github.com/benchopt/benchmark_bilevel.git
55-
benchopt run benchmark_bilevel
56-
57-
which will produce an interactive HTML report to visualize the results.
58-
59-
.. raw:: html
60-
61-
<iframe class="benchmark_result"
62-
src="https://benchopt.github.io/results/benchmark_bilevel_benchmark_bilevel_ijcnn1.html"
63-
frameBorder='0' style="position: relative; width: 100%;">
64-
</iframe>
65-
6650
.. tab-item:: Minimal benchmark
6751

6852
A minimal benchmark comparing various solvers on a toy problem.
@@ -82,7 +66,14 @@ Reproducing an existing benchmark should be as easy as running the following com
8266

8367

8468
These different tabs illustrate the diversity of benchmarks that can be built
85-
with benchopt, from deep learning optimization to more classical machine learning tasks.
69+
with benchopt, from deep learning optimization to more classical machine
70+
learning tasks.
71+
72+
.. tip::
73+
**Want to create a new benchmark with benchopt?** Use our templates to get started:
74+
`ML benchmarks <https://github.com/benchopt/template_benchmark_ml>`_ |
75+
`Optimization benchmarks <https://github.com/benchopt/template_benchmark>`_
76+
8677
There are already many :ref:`available_benchmarks` that have been created using benchopt.
8778
Learn how to run them and how to construct your own with the following pages!
8879

@@ -103,7 +94,8 @@ Learn how to run them and how to construct your own with the following pages!
10394

10495
:octicon:`tools` **Benchmark workflow**
10596
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106-
Write a benchmark from scratch, run it, visualize it, and publish it
97+
Write an ML or optimization benchmark from scratch,
98+
run it, visualize it, and publish it
10799

108100
.. grid-item-card::
109101
:link: tutorials

0 commit comments

Comments
 (0)