-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
This is with ConfigSpace 0.7.1, which is the latest one installable with pip, so my apology if this was fixed already.
It seems I just cannot create an Integer
parameter:
>>> from ConfigSpace import Integer
>>> Integer("x", (1, 42))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/Code/spack/var/spack/environments/bedrock-env/.spack-env/view/lib/python3.11/site-packages/ConfigSpace/api/types/integer.py", line 159, in Integer
return UniformIntegerHyperparameter(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "ConfigSpace/hyperparameters/uniform_integer.pyx", line 48, in ConfigSpace.hyperparameters.uniform_integer.UniformIntegerHyperparameter.__init__
TypeError: Argument 'default_value' has incorrect type (expected int, got NoneType)
>>> Integer("x", (1, 42), default=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/Code/spack/var/spack/environments/bedrock-env/.spack-env/view/lib/python3.11/site-packages/ConfigSpace/api/types/integer.py", line 159, in Integer
return UniformIntegerHyperparameter(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "ConfigSpace/hyperparameters/uniform_integer.pyx", line 82, in ConfigSpace.hyperparameters.uniform_integer.UniformIntegerHyperparameter.__init__
File "ConfigSpace/hyperparameters/uniform_float.pyx", line 62, in ConfigSpace.hyperparameters.uniform_float.UniformFloatHyperparameter.__init__
TypeError: Argument 'default_value' has incorrect type (expected float, got int)
>>> Integer("x", (1, 42), default=1.0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/Code/spack/var/spack/environments/bedrock-env/.spack-env/view/lib/python3.11/site-packages/ConfigSpace/api/types/integer.py", line 159, in Integer
return UniformIntegerHyperparameter(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "ConfigSpace/hyperparameters/uniform_integer.pyx", line 48, in ConfigSpace.hyperparameters.uniform_integer.UniformIntegerHyperparameter.__init__
TypeError: Argument 'default_value' has incorrect type (expected int, got float)
Not specifying the default? It complains that default_value
isn't provided. Passing default=1
? It complains that it wants a float
. Passing default=1.0
? It complains that it wants an int
.
If this was corrected already, could you publish version 0.7.2 to pypi?
Metadata
Metadata
Assignees
Labels
No labels