mlos_core.spaces.adapters.llamatune
Implementation of LlamaTune space adapter.
LlamaTune is a technique that transforms the original parameter space into a lower-dimensional space to try and improve the sample efficiency of the underlying optimizer by making use of the inherent parameter sensitivity correlations in most systems.
See Also: LlamaTune: Sample-Efficient DBMS Configuration Tuning.
Classes
Implementation of LlamaTune, a set of parameter space transformation techniques, |
Module Contents
- class mlos_core.spaces.adapters.llamatune.LlamaTuneAdapter(*, orig_parameter_space: ConfigSpace.ConfigurationSpace, num_low_dims: int = DEFAULT_NUM_LOW_DIMS, special_param_values: dict | None = None, max_unique_values_per_param: int | None = DEFAULT_MAX_UNIQUE_VALUES_PER_PARAM, use_approximate_reverse_mapping: bool = False)[source]
Bases:
mlos_core.spaces.adapters.adapter.BaseSpaceAdapterImplementation of LlamaTune, a set of parameter space transformation techniques, aimed at improving the sample-efficiency of the underlying optimizer.
Create a space adapter that employs LlamaTune’s techniques.
- Parameters:
orig_parameter_space (ConfigSpace.ConfigurationSpace) – The original (user-provided) parameter space to optimize.
num_low_dims (int) – Number of dimensions used in the low-dimensional parameter search space.
special_param_values (dict | None) – Dictionary of special parameter values. Each key is the name of a parameter, and the value is either: - an integer (special value), or - a tuple of an integer and a float (special integer value and biasing percentage)
max_unique_values_per_param (int | None) – Number of unique values per parameter. Used to discretize the parameter space. If None space discretization is disabled.
use_approximate_reverse_mapping (bool) – Whether to use an approximate reverse mapping to help register configurations during resume.
- inverse_transform(configuration: pandas.Series) pandas.Series[source]
Translates a configuration, which belongs to the original parameter space, to the target parameter space. This method is called by the register method of the
BaseOptimizerclass, and performs the inverse operation oftransform()method.- Parameters:
configuration (pandas.Series) – A Series of configuration parameters, which belong to the original parameter space. The indices are the parameter names the original parameter space and the rows are the configurations.
- Returns:
configuration – Series of the translated configurations / parameters. The indices are the parameter names of the target parameter space and the rows are the configurations.
- Return type:
- transform(configuration: pandas.Series) pandas.Series[source]
Translates a configuration, which belongs to the target parameter space, to the original parameter space. This method is called by the
suggest()method of theBaseOptimizerclass.- Parameters:
configuration (pandas.Series) – Pandas series. Column names are the parameter names of the target parameter space.
- Returns:
configuration – Pandas series, containing the translated configuration. Column names are the parameter names of the original parameter space.
- Return type:
- DEFAULT_MAX_UNIQUE_VALUES_PER_PARAM = 10000[source]
Default number of (max) unique values of each parameter, when space discretization is used.
- DEFAULT_NUM_LOW_DIMS = 16[source]
Default number of dimensions in the low-dimensional search space, generated by HeSBO projection.
- DEFAULT_SPECIAL_PARAM_VALUE_BIASING_PERCENTAGE = 0.2[source]
Default percentage of bias for each special parameter value.
- property target_parameter_space: ConfigSpace.ConfigurationSpace[source]
Get the parameter space, which is explored by the underlying optimizer.
- Return type: