-
Notifications
You must be signed in to change notification settings - Fork 217
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
HyperparameterOptimizationFacade does wrong initial_design for hyperparameters from type NormalInteger #1052
Comments
Hi, Thanks for the information. This issue might be related to ConfigSpace: automl/ConfigSpace#302 |
This is likely not related to the issue you posted @dengdifan ConfigSpace seems to be behaving quite nicely from the example given: from ConfigSpace import Categorical, ConfigurationSpace, Integer, Normal
grid = ConfigurationSpace(
seed=42,
space={
"n_estimators": Integer("n_estimators", (10, 1000), log=True, default=100),
"max_depth": Integer("max_depth", (3, 15), distribution=Normal(5, 3), default=5),
"min_samples_split": Integer("min_samples_split", (2, 10), default=2),
"min_samples_leaf": Integer("min_samples_leaf", (1, 4), default=1),
"bootstrap": Categorical("bootstrap", [True, False], default=True),
"criterion": Categorical("criterion", ["gini", "entropy"], default="gini"),
},
)
max_depths_sampled = {
grid.sample_configuration()["max_depth"] for i in range(10000)
}
print(sorted(max_depths_sampled))
# [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] |
Some further digging into SMAC, I'm assuming it's this line that's causing the issue: SMAC3/smac/initial_design/abstract_initial_design.py Lines 180 to 181 in e64e191
I'm not exactly sure what's in the tldr; likely a ConfigSpace issue just a different one |
@eddiebergman Did you raise the issue above at ConfigSpace? |
Description
I am currently trying to use HyperparameterOptimizationFacade for my RandomForestClassifier and defined a ConfigSpace.ConfigurationSpace for its hyperparameters. The problem is that the .get_initial_design() function is returning a not working configuration with "max_depth=0". This should not be possible with the used ConfigSpace.ConfigurationSpace. I tested it for other grids and it seems that there is a problem with handling NormalInteger type in the defined grid.
Steps/Code to Reproduce
Expected Results
A valid configuration so that no error will occur in HyperparameterOptimizationFacade because of not possible parameter values.
Actual Results
Versions
smac: 2.0.1
ConfigSpace: 0.6.1
The text was updated successfully, but these errors were encountered: