Describe the bug
Following the QuickStart procedure, I am trying to defining the search space for 23 parameters :
space = sp.Space()
P1 = sp.Real("P1", 0.0, 1.0)
P2 = sp.Real("P2", 0, 1)
P3 = sp.Real("P3", 0.0, 0.5)
P4 = sp.Real("P4", 0.0, 0.5)
P5 = sp.Real("P5", -5.0, 5.0)
P6 = sp.Real("P6", -5.0, 5.0)
P7 = sp.Real("P7", -5.0, 0.0)
P8 = sp.Real("P8", 0.0, 10.0)
P9 = sp.Real("P9", 0.0, 10.0)
P10 = sp.Real("P10", 0.0, 30.0)
P11 = sp.Real("P11", 0.0, 15.0)
P12 = sp.Real("P12", 0.0, 20.0)
P13 = sp.Real("P13", 0.0, 20.0)
P14 = sp.Real("P14", 0.0, 20.0)
P15 = sp.Real("P15", 0.0, 1.0)
P16 = sp.Real("P16", 0.0, 1.0)
P17 = sp.Real("P17", 0.0, 1.0)
P18 = sp.Real("P18", 0.0, 1.0)
P19 = sp.Real("P19", 0.0, 1.0)
P20 = sp.Real("P20", 0.0, 1.0)
P21 = sp.Real("P21", 0.0, 1.0)
P22 = sp.Real("P22", 0.0, 1.0)
P23 = sp.Real("P23", 0.0, 1.0)
space.add_variables([P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13,
P14, P15, P16, P17, P18, P19, P20, P21, P22, P23])
When running the script, I get an error as soon as I try to define P1:
P1 = sp.Real("P1", 0.0, 1.0)
File ~\anaconda3\Lib\site-packages\openbox\utils\space.py:99 in init
super().init(name=name, lower=lower, upper=upper,
File ConfigSpace\hyperparameters.pyx:669 in ConfigSpace.hyperparameters.UniformFloatHyperparameter.init
File ConfigSpace\hyperparameters.pyx:731 in ConfigSpace.hyperparameters.UniformFloatHyperparameter.check_default
TypeError: Expected float, got numpy.float64
I tried to force a float value with :
P1 = sp.Real("P1", float(0.0), float(1.0))
Without success.
Expected behavior
I am unsure why this variable definition isn't working, I expected my parameters to be properly defined so that I can then use them in my objective_function as an input to another script, but it doesn't get to that point.
Can anyone help with this issue?
Describe the bug
Following the QuickStart procedure, I am trying to defining the search space for 23 parameters :
space = sp.Space()
P1 = sp.Real("P1", 0.0, 1.0)
P2 = sp.Real("P2", 0, 1)
P3 = sp.Real("P3", 0.0, 0.5)
P4 = sp.Real("P4", 0.0, 0.5)
P5 = sp.Real("P5", -5.0, 5.0)
P6 = sp.Real("P6", -5.0, 5.0)
P7 = sp.Real("P7", -5.0, 0.0)
P8 = sp.Real("P8", 0.0, 10.0)
P9 = sp.Real("P9", 0.0, 10.0)
P10 = sp.Real("P10", 0.0, 30.0)
P11 = sp.Real("P11", 0.0, 15.0)
P12 = sp.Real("P12", 0.0, 20.0)
P13 = sp.Real("P13", 0.0, 20.0)
P14 = sp.Real("P14", 0.0, 20.0)
P15 = sp.Real("P15", 0.0, 1.0)
P16 = sp.Real("P16", 0.0, 1.0)
P17 = sp.Real("P17", 0.0, 1.0)
P18 = sp.Real("P18", 0.0, 1.0)
P19 = sp.Real("P19", 0.0, 1.0)
P20 = sp.Real("P20", 0.0, 1.0)
P21 = sp.Real("P21", 0.0, 1.0)
P22 = sp.Real("P22", 0.0, 1.0)
P23 = sp.Real("P23", 0.0, 1.0)
space.add_variables([P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13,
P14, P15, P16, P17, P18, P19, P20, P21, P22, P23])
When running the script, I get an error as soon as I try to define P1:
P1 = sp.Real("P1", 0.0, 1.0)
File ~\anaconda3\Lib\site-packages\openbox\utils\space.py:99 in init
super().init(name=name, lower=lower, upper=upper,
File ConfigSpace\hyperparameters.pyx:669 in ConfigSpace.hyperparameters.UniformFloatHyperparameter.init
File ConfigSpace\hyperparameters.pyx:731 in ConfigSpace.hyperparameters.UniformFloatHyperparameter.check_default
TypeError: Expected float, got numpy.float64
I tried to force a float value with :
P1 = sp.Real("P1", float(0.0), float(1.0))
Without success.
Expected behavior
I am unsure why this variable definition isn't working, I expected my parameters to be properly defined so that I can then use them in my objective_function as an input to another script, but it doesn't get to that point.
Can anyone help with this issue?