Skip to content

Commit ed74a51

Browse files
committed
fix: __contains__ for configspace
1 parent 93abc5b commit ed74a51

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ConfigSpace/configuration_space.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,9 @@ def __getitem__(self, key: str) -> Hyperparameter:
11401140

11411141
return hp
11421142

1143+
def __contains__(self, key: str) -> bool:
1144+
return key in self._hyperparameters
1145+
11431146
def __repr__(self) -> str:
11441147
retval = io.StringIO()
11451148
retval.write("Configuration space object:\n Hyperparameters:\n")

0 commit comments

Comments
 (0)