Open amirbalef opened 1 month ago
Hi @amirbalef,
Yup, that's intended behavior. Due to the fact you can create arbitrarily nested components, internally I need some delimiter to be able to know where to pass down what config values. Typically, I would suggest that you don't need a delimiter as you can see we already prefix with Model:
, i.e. the name of the Component
.
If you want a different name, i.e. different prefix in the ConfigurationSpace
, you could do the following:
hyp = ConfigSpace.api.types.categorical.Categorical(
name="name", # Remove delimiter
items=["M1", "M2"],
)
space = ConfigSpace.configuration_space.ConfigurationSpace(name="main_sapce")
space.add(hyp)
pipeline = Component(Model, space=space, name="model") # Add a name to the component
Which should give you this search space:
Configuration space object:
Hyperparameters:
model:name, Type: Categorical, Choices: {M1, M2}, Default: M1
Suggested config: Configuration(values={
'model:name': 'M1',
})
Passed config: {}
Otherwise, if that doesn't fit your needs, I would recommend as you have rightly spotted, using a different delimiter. Using .
is also a pretty good alternative.
Given there are a ton of work-arounds and it's intended behaviour, I'm going to close it as wontfix
, unless there's some other reason where you really need your own :
delimiter in there that is not derived from the Component.name
Actually, I removed the wontfix
label and the real solution to this issue is just to explicitly raise an error when this happens, detailing why and the alternatives. I'll keep this open then!
Describe the bug Hi, I am not sure if it is a bug or if I am not using AMLTK correctly. When using a colon (:) in a hyperparameter's name and creating a component, the configuration does not pass through the pipline to the model correctly. The cause of this issue is located at line 431 of node.py in the repository: node.py#L431. If there is a colon in the hyperparameter's name, the hyperparameter gets filtered out.
For example, the configuration space below shows the hyperparameter
model:name
which contains a colon:To Reproduce Steps to reproduce the behavior:
Suggested config: Configuration(values={ 'Model:model:name': 'M1', }) Passed config: {}