mlos_core.spaces.converters.util

Helper functions for config space converters.

Attributes

QUANTIZATION_BINS_META_KEY

Functions

monkey_patch_cs_quantization(...)

Monkey-patch quantization into the Hyperparameters of a ConfigSpace.

monkey_patch_hp_quantization(...)

Monkey-patch quantization into the Hyperparameter.

Module Contents

mlos_core.spaces.converters.util.monkey_patch_cs_quantization(cs: ConfigSpace.ConfigurationSpace) ConfigSpace.ConfigurationSpace[source]

Monkey-patch quantization into the Hyperparameters of a ConfigSpace.

Parameters:

cs (ConfigSpace.ConfigurationSpace) – ConfigSpace to patch.

Returns:

cs – Patched ConfigSpace.

Return type:

ConfigSpace.ConfigurationSpace

mlos_core.spaces.converters.util.monkey_patch_hp_quantization(hp: ConfigSpace.hyperparameters.Hyperparameter) ConfigSpace.hyperparameters.Hyperparameter[source]

Monkey-patch quantization into the Hyperparameter.

Temporary workaround to dropped quantization support in ConfigSpace 1.0

Notes

See <https://github.com/automl/ConfigSpace/issues/390>.

Parameters:

hp (ConfigSpace.hyperparameters.Hyperparameter) – ConfigSpace hyperparameter to patch.

Returns:

hp – Patched hyperparameter.

Return type:

ConfigSpace.hyperparameters.Hyperparameter

mlos_core.spaces.converters.util.QUANTIZATION_BINS_META_KEY = 'quantization_bins'[source]