ConfigSpace
ConfigSpace copied to clipboard
`get_neighbours` of log transformed `UniformIntegerHyperparameter` can hang
from ConfigSpace import UniformIntegerHyperparameter
u = UniformIntegerHyperparameter("u", 1, 10, log=True)
rs = np.random.RandomState(3)
u.get_neighbors(3, rs)
# Hangs....
This is possibly related to #187.
The refactor for #187 added a check which makes the given input invalid and the output is now
Traceback (most recent call last):
File "/home/feurerm/sync_dir/projects/ConfigSpace/bug263.py", line 7, in <module>
u.get_neighbors(3, rs)
File "ConfigSpace/hyperparameters.pyx", line 1604, in ConfigSpace.hyperparameters.UniformIntegerHyperparameter.get_neighbors
assert 0 <= value <= 1, (
AssertionError: For get neighbors of UniformIntegerHyperparameter, the value if assumed to be in the unit-hypercube [0, 1]. If this was not the behaviour assumed, please raise a ticket on github.