You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from ConfigSpace import ConfigurationSpace, ForbiddenEqualsRelation, Integer
cs = ConfigurationSpace()
x = Integer('x', (0,3))
y = Integer('y', (0,3))
cs.add(x)
cs.add(y)
cs.add(ForbiddenEqualsRelation(x, y))
which gives me an exception:
ConfigSpace.exceptions.ForbiddenValueError: Given vector violates forbidden clause: Forbidden: x == y
If I'm changing ForbiddenEqualsRelation to ForbiddenGreaterThanRelation the code works fine, generating configurations such that x is always less than or equal to y. I would expect ForbiddenEqualsRelation to allow me to generate configurations such that x is always different from y. Am I misunderstanding the use of ForbiddenEqualsRelation or is there a bug?
The text was updated successfully, but these errors were encountered:
Ahh, the issue is actually just a bad error message. The issue you are seeing derives from the fact that the default configuration is forbidden, and ConfigSpace requires the default configuration to be valid.
You can get around this fact by setting a default on one of them not beround((3 - 0)/ 2) == 2
Thanks, it makes sense, at least it forces the user to provide a valid default configuration, proving that such a configuration exists (otherwise it's a SAT problem).
Good point, from a more practical standpoint, the default is also used internally in configuration neighborhood search, for example, it answers the question that if a conditional was activated that suddenly activated a bunch of new parameters, what should they be set to?
I have this sample code:
which gives me an exception:
If I'm changing
ForbiddenEqualsRelation
toForbiddenGreaterThanRelation
the code works fine, generating configurations such thatx
is always less than or equal toy
. I would expectForbiddenEqualsRelation
to allow me to generate configurations such thatx
is always different fromy
. Am I misunderstanding the use ofForbiddenEqualsRelation
or is there a bug?The text was updated successfully, but these errors were encountered: