gemseo_benchmark / benchmarker

Hide inherited members

benchmarker module

A benchmarker of optimization algorithms on reference problems.

class gemseo_benchmark.benchmarker.benchmarker.Benchmarker(histories_path, results_path=None, databases_path=None)[source]

Bases: object

A benchmarker of optimization algorithms on reference problems.

Parameters:
  • histories_path (Path) – The path to the directory where to save the performance histories.

  • results_path (Path | None) – The path to the file for saving the performance histories paths. If exists, the file is updated with the new performance histories paths.

  • databases_path (Path | None) – The path to the destination directory for the databases. If None, the databases will not be saved.

execute(problems, algorithms, overwrite_histories=False, number_of_processes=1, use_threading=False)[source]

Run optimization algorithms on reference problems.

Parameters:
  • problems (Iterable[Problem]) – The benchmarking problems.

  • algorithms (AlgorithmsConfigurations) – The algorithms configurations.

  • overwrite_histories (bool) –

    Whether to overwrite the existing performance histories.

    By default it is set to False.

  • number_of_processes (int) –

    The maximum simultaneous number of threads or processes used to parallelize the execution.

    By default it is set to 1.

  • use_threading (bool) –

    Whether to use threads instead of processes to parallelize the execution.

    By default it is set to False.

Returns:

The results of the optimization.

Raises:

ValueError – If the algorithm is not available.

Return type:

Results