automl / DEHB

https://automl.github.io/DEHB/
Apache License 2.0
71 stars 16 forks source link

No support for Constant type in vector_to_configspace() and configspace_to_vector() #52

Closed haibkhn closed 1 year ago

haibkhn commented 1 year ago

Hello,

I've been working with DEHB on my dataset and came across an issue with the processing of ConfigSpace in the de.py file. Specifically, in the functions vector_to_configspace() and configspace_to_vector(), there seems to be no option or support for handling the ConfigSpace Constant type.

Is this an oversight or intentional? If it's the latter, should I avoid including the Constant type in my ConfigSpace or is there a recommended workaround?

Thanks for your assistance!

Neeratyoy commented 1 year ago

Hi Thanks for raising this issue. This is certainly more an oversight as during the development of DEHB there were no search spaces with a constant hyperparameter.

Please feel free to add this change into the function and contribute a PR! You can refer to our Contributing guide.

Also, @Bronzila we might need to take a brief look if other changes are required in the core DE algorithm to account for constant hyperparameters without any bounds.

Bronzila commented 1 year ago

Hi,

I've taken a brief look at the core algorithm and I think the easiest way would be to map Constants to 0 in configspace_to_vector() and then back to its original value in vector_to_configspace(). This would not mess up mutation, since all currently implemented mutation strategies rely on distances and therefore this parameter will always stay 0.

If we plan to introduce more mutation strategies, that may not only rely on distances, this could be a potential problem. So maybe we would need to think of another way of book-keeping Constants, but for now the answer mentioned above should suffice IMHO.

Bronzila commented 1 year ago

Hey @haibkhn Just a little heads up; we released v0.0.7 and included the changes to support constant hyperparameters, feel free to update dehb and try it out!