gemseo_benchmark

Hide inherited members

scenario module

A class to implement a benchmarking scenario (solving and reporting).

class gemseo_benchmark.scenario.Scenario(algorithms_configurations_groups, outputs_path)[source]

Bases: object

A benchmarking scenario, including running of solvers and reporting.

Parameters:
  • algorithms_configurations_groups (Iterable[AlgorithmsConfigurations]) – The groups of algorithms configurations to be benchmarked.

  • outputs_path (str | Path) – The path to the directory where to save the output files (histories and report).

Raises:

ValueError – If the path to outputs directory does not exist.

execute(problems_groups, overwrite_histories=False, skip_solvers=False, skip_report=False, generate_html_report=True, generate_pdf_report=False, infeasibility_tolerance=0.0, save_databases=False, number_of_processes=1, use_threading=False, custom_algos_descriptions=None, max_eval_number_per_group=None, plot_all_histories=True, use_log_scale=False)[source]

Execute the benchmarking scenario.

Parameters:
  • problems_groups (Iterable[ProblemsGroup]) – The groups of benchmarking problems.

  • overwrite_histories (bool) –

    Whether to overwrite the performance histories.

    By default it is set to False.

  • skip_solvers (bool) –

    Whether to skip the running of solvers.

    By default it is set to False.

  • skip_report (bool) –

    Whether to skip the generation of the report.

    By default it is set to False.

  • generate_html_report (bool) –

    Whether to generate the report in HTML format.

    By default it is set to True.

  • generate_pdf_report (bool) –

    Whether to generate the report in PDF format.

    By default it is set to False.

  • infeasibility_tolerance (float) –

    The tolerance on the infeasibility measure.

    By default it is set to 0.0.

  • save_databases (bool) –

    Whether to save the databases of the optimizations.

    By default it is set to False.

  • number_of_processes (int) –

    The maximum number of simultaneous 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.

  • custom_algos_descriptions (Mapping[str, str] | None) – Custom descriptions of the algorithms, to be printed in the report instead of the default ones coded in GEMSEO.

  • max_eval_number_per_group (dict[str, int] | None) – The maximum evaluations numbers to be displayed on the graphs of each group. The keys are the groups names and the values are the maximum evaluations numbers for the graphs of the group. If None, all the evaluations are displayed. If the key of a group is missing, all the evaluations are displayed for the group.

  • plot_all_histories (bool) –

    Whether to plot all the performance histories.

    By default it is set to True.

  • use_log_scale (bool) –

    Whether to use a logarithmic scale on the value axis.

    By default it is set to False.

Returns:

The performance histories.

Return type:

Results