Skip to main content

Benchmark toolkit for optimization

Project description

https://raw.githubusercontent.com/benchopt/communication_materials/main/posters/images/logo_benchopt.png

—Making your ML and optimization benchmarks simple and open—


Test Status codecov Documentation Python 3.6+ install-per-months discord SWH

Benchopt is a benchmarking suite tailored for machine learning workflows. It is built for simplicity, transparency, and reproducibility. It is implemented in Python but can run algorithms written in many programming languages.

So far, benchopt has been tested with Python, R, Julia and C/C++ (compiled binaries with a command line interface). Programs available via conda should be compatible as well. See for instance an example of usage with R.

Install

It is recommended to use benchopt within a conda environment to fully-benefit from benchopt Command Line Interface (CLI).

To install benchopt, start by creating a new conda environment and then activate it

conda create -n benchopt python
conda activate benchopt

Then run the following command to install the latest release of benchopt

pip install -U benchopt

It is also possible to use the latest development version. To do so, run instead

pip install git+https://github.com/benchopt/benchopt.git

Getting started

After installing benchopt, you can

  • replicate/modify an existing benchmark

  • create your own benchmark

Using an existing benchmark

Replicating an existing benchmark is simple. Here is how to do so for the L2-logistic Regression benchmark.

  1. Clone the benchmark repository and cd to it

git clone https://github.com/benchopt/benchmark_logreg_l2
cd benchmark_logreg_l2
  1. Install the desired solvers automatically with benchopt

benchopt install . -s lightning -s sklearn
  1. Run the benchmark to get the figure below

benchopt run . --config ./example_config.yml
https://benchopt.github.io/_images/sphx_glr_plot_run_benchmark_001.png

These steps illustrate how to reproduce the L2-logistic Regression benchmark. Find the complete list of the Available benchmarks. Also, refer to the documentation to learn more about benchopt CLI and its features. You can also easily extend this benchmark by adding a dataset, solver or metric. Learn that and more in the Benchmark workflow.

Creating a benchmark

The section Write a benchmark of the documentation provides a tutorial for creating a benchmark. The benchopt community also maintains a template benchmark to quickly and easily start a new benchmark.

Finding help

Join benchopt discord server and get in touch with the community! Feel free to drop us a message to get help with running/constructing benchmarks or (why not) discuss new features to be added and future development directions that benchopt should take.

Citing Benchopt

Benchopt is a continuous effort to make reproducible and transparent ML and optimization benchmarks. Join us in this endeavor! If you use benchopt in a scientific publication, please cite

@inproceedings{benchopt,
   author    = {Moreau, Thomas and Massias, Mathurin and Gramfort, Alexandre
                and Ablin, Pierre and Bannier, Pierre-Antoine
                and Charlier, Benjamin and Dagréou, Mathieu and Dupré la Tour, Tom
                and Durif, Ghislain and F. Dantas, Cassio and Klopfenstein, Quentin
                and Larsson, Johan and Lai, En and Lefort, Tanguy
                and Malézieux, Benoit and Moufad, Badr and T. Nguyen, Binh and Rakotomamonjy,
                Alain and Ramzi, Zaccharie and Salmon, Joseph and Vaiter, Samuel},
   title     = {Benchopt: Reproducible, efficient and collaborative optimization benchmarks},
   year      = {2022},
   booktitle = {NeurIPS},
   url       = {https://arxiv.org/abs/2206.13424}
}

Available benchmarks

Problem

Results

Build Status

Ordinary Least Squares (OLS)

Results

Build Status OLS

Non-Negative Least Squares (NNLS)

Results

Build Status NNLS

LASSO: L1-Regularized Least Squares

Results

Build Status Lasso

LASSO Path

Results

Build Status Lasso Path

Elastic Net

Build Status ElasticNet

MCP

Results

Build Status MCP

L2-Regularized Logistic Regression

Results

Build Status LogRegL2

L1-Regularized Logistic Regression

Results

Build Status LogRegL1

L2-regularized Huber regression

Build Status HuberL2

L1-Regularized Quantile Regression

Results

Build Status QuantileRegL1

Linear SVM for Binary Classification

Build Status LinearSVM

Linear ICA

Build Status LinearICA

Approximate Joint Diagonalization (AJD)

Build Status JointDiag

1D Total Variation Denoising

Build Status TV1D

2D Total Variation Denoising

Build Status TV2D

ResNet Classification

Results

Build Status ResNetClassif

Bilevel Optimization

Results

Build Status Bilevel

BSD 3-Clause License

Copyright (c) 2019–2022 The Benchopt developers. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the Benchopt Developers nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benchopt-1.6.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

benchopt-1.6.0-py3-none-any.whl (180.1 kB view details)

Uploaded Python 3

File details

Details for the file benchopt-1.6.0.tar.gz.

File metadata

  • Download URL: benchopt-1.6.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for benchopt-1.6.0.tar.gz
Algorithm Hash digest
SHA256 ffcf7192a4386e67c4fabbd4cee40049ad52de1dcea9ef364e8d0c700139517d
MD5 fa1fe98ba3a7627c121f42b1ff3f25d1
BLAKE2b-256 9621de67cdb5c13594ce016f749ddb53b9cae1c4f41aa4d83b78d4b0d03c2005

See more details on using hashes here.

File details

Details for the file benchopt-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: benchopt-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 180.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for benchopt-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68477cbc71bff3ef4f4a45d1d7a1449edc7d1d3b26dac7101afcf87b6b05ac49
MD5 0bf431ad98913a69c9dcc8c493b9d05b
BLAKE2b-256 05db7bfa52b411da3689f2c13f2d26bbb8d3266b21125dd16d7ff4e3dca8ba34

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page