gemseo_benchmark / algorithms

Hide inherited members

algorithm_configuration module

Configuration of an algorithm defined by the values of its options.

An algorithm depends on the values of its options. A value set defines a configuration of the algorithm.

class gemseo_benchmark.algorithms.algorithm_configuration.AlgorithmConfiguration(algorithm_name, configuration_name=None, **algorithm_options)[source]

Bases: object

The configuration of an algorithm.

Parameters:
  • algorithm_name (str) – The name of the algorithm.

  • configuration_name (str | None) – The name of the configuration of the algorithm. If None, a name will be generated based on the algorithm name and its options, based on the pattern "algorithm_name[option_name=option_value, ...]".

  • **algorithm_options (Any) – The options of the algorithm.

classmethod from_dict(algorithm_configuration)[source]

Load an algorithm configuration from a dictionary.

Parameters:

algorithm_configuration (dict[str, str | dict[str, Any]]) – The algorithm configuration.

Returns:

The algorithm configuration.

Return type:

AlgorithmConfiguration

to_dict()[source]

Return the algorithm configuration as a dictionary.

Return type:

dict[str, str | dict[str, Any]]

property algorithm_name: str

The name of the algorithm.

property algorithm_options: dict[str, Any]

The options of the algorithm.

property name: str

The name of the algorithm configuration.