-
Notifications
You must be signed in to change notification settings - Fork 6
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
YAHPO Gym always requries full configuration, also in case of forbidden hyperparameters #94
Comments
Thanks for opening this issue. benchmark.get_opt_space()
tells you how a configuration should look like based on the optimization space (which sets the instance value to a constant and potentially drops fidelity parameters fixing them at the highest value); i.e. if we sample a point from the optimization space we can also see what the benchmark expects to be part of a configuration: benchmark.get_opt_space().sample_configuration(1)
i.e., a configuration must always contain all parameters that are active. If you keep benchmark = benchmark_set.BenchmarkSet(scenario="rbv2_ranger", check=True)
config = {
"min.node.size": 50,
"mtry.power": 0.0,
"num.impute.selected.cpo": "impute.mean",
"num.trees": 1000,
"respect.unordered.factors": "ignore",
"sample.fraction": 0.55,
"splitrule": "gini",
"task_id": "470",
}
print(benchmark.objective_function(config)) you will actual be told that your point is not fully specified:
So in general, unless you always specify points fully, setting What I am not sure about is the " |
Hi, Thank you for your swift answer :) Yes, the issue appears to be caused by us using the new configspace. Due to the old ConfigSpace, SMAC and other libraries can, by default, not be used with yahpogym. For that reason, we use an updated form of configspace created by @benjamc and patch local references. This was done for CARP-S. git clone https://github.com/benjamc/yahpo_gym.git lib/yahpo_gym
$CONDA_RUN_COMMAND $PIP install -e lib/yahpo_gym/yahpo_gym
cd $CARPS_ROOT/carps
mkdir benchmark_data
cd benchmark_data
git clone https://github.com/slds-lmu/yahpo_data.git
cd ../..
$CONDA_RUN_COMMAND python $CARPS_ROOT/scripts/patch_yahpo_configspace.py
$CONDA_RUN_COMMAND $PIP install ConfigSpace --upgrade In order to still be able to use the library, we start from a default configuration and replace all optimized parameters as indicated as indicated below. Would you suggest setting those parameters differently? We would assume that the surrogate would be trained with the defaults? def _train(self, config: Configuration, seed: int = 0):
# Start with default config and replace values. Otherwise YahpoGym fails
final_config = self.benchmark._get_config_space().get_default_configuration()
for name, value in config.items():
final_config[name] = value
res = self.benchmark.objective_function(configuration=final_config) |
I observed this behavior, for example, in the case of "rbv2_ranger" on '470'.
The following example is created with a fresh environment and yahpogym . check=false is required because config space 0.6.1 does not contain the needed
check_valid_configuration
methodThe text was updated successfully, but these errors were encountered: