SMAC3
SMAC3 copied to clipboard
intial designs raise an error if the generated vector conflicts the forbidden clauses
Description
If forbidden clauses exist in smac's configspace and initial design generators generates a vector that conflicts the forbidden clauses, rather then ignore and skip that, SMAC will raise an error
Steps/Code to Reproduce
from ConfigSpace import CategoricalHyperparameter
from ConfigSpace.forbidden import ForbiddenEqualsClause
from ConfigSpace.configuration_space import ConfigurationSpace
from smac.scenario.scenario import Scenario
from smac.facade.smac_hpo_facade import SMAC4HPO
cs = ConfigurationSpace()
hp = CategoricalHyperparameter('hp1', choices=['True', 'False'])
hp_forbidden = ForbiddenEqualsClause(hp, 'False')
cs.add_hyperparameter(hp)
cs.add_forbidden_clause(hp_forbidden)
scenario = Scenario({"run_obj": "quality",
"cs": cs,
})
smac = SMAC4HPO(scenario=scenario,)
smac.optimize()
Actual Results
SMAC raise an error:
ConfigSpace.exceptions.ForbiddenValueError: Given vector violates forbidden clause Forbidden: hp1 == 'False'
Versions
0.12.3
Im facing the issue with ForbiddenEqualsClause the raised error is identical.
Versions smac: 0.13.1 ConfigSpace: 0.4.18
weirdly, you may get past this bug if you used facade SMAC4AC
@HadiKutabi SMAC4AC
and SMAC4HPO
use different initial designs. In fact, SMAC4AC
is only running the default configuration, which by definition should not be forbidden.
@mlindauer Thanks for the info!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
By now, if the initial design generator generates a vector that conflicts the forbidden clauses, that vector will be ignored and skipped.