Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orders of Conjunctions result in unequal ConfigSpace #334

Open
dengdifan opened this issue Jul 13, 2023 · 1 comment · May be fixed by #346
Open

Orders of Conjunctions result in unequal ConfigSpace #334

dengdifan opened this issue Jul 13, 2023 · 1 comment · May be fixed by #346

Comments

@dengdifan
Copy link
Contributor

Similar to #73 . However, if the order of two conjunctions (maybe also forbiddenclauses) is different, then the two configurations will be considered different ones:

from ConfigSpace import ConfigurationSpace, CategoricalHyperparameter
from ConfigSpace.conditions import EqualsCondition, OrConjunction

x = CategoricalHyperparameter('x', [1,2,3])
y = CategoricalHyperparameter('y', [0,1])
z = CategoricalHyperparameter('z', [0,1])

cs1 = ConfigurationSpace()
cs1.add_hyperparameters([x,y,z])
cs1.add_condition(
    OrConjunction(
        EqualsCondition(x, y, 0), EqualsCondition(x,z,0)
    )
)

cs2 = ConfigurationSpace()
cs2.add_hyperparameters([x,y,z])
cs2.add_condition(
    OrConjunction(
        EqualsCondition(x,z,0), EqualsCondition(x, y, 0)
    )
)
assert cs1 == cs2
@eddiebergman
Copy link
Contributor

Heyo, thanks for this. Closed in #346!

@eddiebergman eddiebergman linked a pull request Apr 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants