ConfigSpace
ConfigSpace copied to clipboard
Internal configuration is updated when operating on dictionary
If I change the dictionary of a configuration, it automatically changes the internal config. See example below.
from ConfigSpace import ConfigurationSpace
cs = ConfigurationSpace(
{
"a": (0.1, 1.5),
"b": (2, 10),
"c": ["cat", "dog", "mouse"],
}
)
config = cs.sample_configuration(1)
print(config)
config_dict = config.get_dictionary()
config_dict["a"] = 10000
print(config)
gives the output
Configuration(values={
'a': 0.7385024919656622,
'b': 4,
'c': 'cat',
})
Configuration(values={
'a': 10000,
'b': 4,
'c': 'cat',
})