ConfigSpace icon indicating copy to clipboard operation
ConfigSpace copied to clipboard

Internal configuration is updated when operating on dictionary

Open renesass opened this issue 3 years ago • 0 comments

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',
})

renesass avatar Aug 08 '22 12:08 renesass