Skip to content

Commit b07a19e

Browse files
Fix forbidden Configurations Space (#167)
* fix forbidden components * Debug messages * is the problem due to None * change * cleanup for PR * cleanup for PR * fix comparisson to string
1 parent 4ca75c7 commit b07a19e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

ConfigSpace/forbidden.pyx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,18 @@ cdef class AbstractForbiddenComponent(object):
7070
which takes an integer indicating which operation is to be performed,
7171
as follows:
7272
< 0
73-
== 2
73+
== 2
7474
> 4
7575
<= 1
7676
!= 3
7777
>= 5
7878
"""
7979
if self.value is None:
8080
self.value = self.values
81-
other.value = other.values
8281

8382
if isinstance(other, self.__class__):
83+
if other.value is None:
84+
other.value = other.values
8485
if op == 2:
8586
return (self.value == other.value
8687
and self.hyperparameter.name == other.hyperparameter.name)
@@ -362,7 +363,7 @@ cdef class AbstractForbiddenConjunction(AbstractForbiddenComponent):
362363
which takes an integer indicating which operation is to be performed,
363364
as follows:
364365
< 0
365-
== 2
366+
== 2
366367
> 4
367368
<= 1
368369
!= 3
@@ -377,7 +378,7 @@ cdef class AbstractForbiddenConjunction(AbstractForbiddenComponent):
377378
for i in range(self.n_components)])
378379

379380
elif op == 3:
380-
if self.n_copmonents == other.n_components:
381+
if self.n_components == other.n_components:
381382
return False
382383
return any([self.components[i] != other.components[i]
383384
for i in range(self.n_components)])

0 commit comments

Comments
 (0)