automl / ConfigSpace

Domain specific language for configuration spaces in Python/Cython. Useful for hyperparameter optimization and algorithm configuration.
https://automl.github.io/ConfigSpace/
Other
193 stars 89 forks source link

Hashing of Normal{Float/Integer}Hyperparameter is incorrect #317

Closed Neonkraft closed 1 year ago

Neonkraft commented 1 year ago

The hashes of NormalFloatHyperparameter and NormalFloatHyperparameter do not include the bounds of the hyperparameters.

from ConfigSpace import NormalIntegerHyperparameter

hp1 = NormalIntegerHyperparameter(
                 name='hp1',
                 mu=0,
                 sigma=1
)

hp2 = NormalIntegerHyperparameter(
                 name='hp1',
                 mu=0,
                 sigma=1,
                 lower=0,
                 upper=1
)

hp1.__hash__() == hp2.__hash__() # Should be False, but is True

Both these Hyperparameters have the same hash.

eddiebergman commented 1 year ago

Nice find!