Python API

Here is a list of Python functions available to construct a new benchmark with benchopt:

List of base classes:

BaseObjective(**parameters)

Base class to define an objective function

BaseDataset(**parameters)

Base class to define a dataset in a benchmark.

BaseSolver(**parameters)

A base class for solver wrappers in BenchOpt.

Benchopt run hooks

skip(): hook to allow skipping some configurations. Also available for Dataset and Objective.

get_next(): hook to change the sampling points for a given solver.

pre_run_hook(): hook called before each call to run, with the same argument. Allows to skip certain computation that cannot be cached globally, such as precompilation with different number of iterations in for jitted jax functions.

Benchopt utils

run_benchmark(benchmark[, solver_names, ...])

Run full benchmark.

safe_import_context()

Context used to manage import in benchmarks.

plotting.plot_benchmark(fname, benchmark[, ...])

Plot convergence curve and bar chart for a given benchmark.

datasets.simulated.make_correlated_data([...])

Generate a linear regression with decaying correlation for the design matrix \(\rho^{|i-j|}\).

utils.profile(func)

Decorator to tell line profiler which function to profile.