Skip to content

Commit 5fbb0ca

Browse files
committed
Fix data manager
1 parent 435d916 commit 5fbb0ca

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

hpobench/benchmarks/ml/yahpo_benchmark.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,20 @@ def __init__(self, scenario: str, instance: str,
114114
Parameters
115115
----------
116116
scenario : str
117-
Name for the surrogate data. Must be one of ["lcbench", "fcnet", "nb301", "rbv2_svm",
118-
"rbv2_ranger", "rbv2_rpart", "rbv2_glmnet", "rbv2_aknn", "rbv2_xgboost", "rbv2_super"]
117+
Name for the learner. Must be one of [
118+
"rbv2_ranger", "rbv2_rpart", "rbv2_glmnet", "rbv2_xgboost", "rbv2_svm", "rbv2_aknn", "rbv2_super",
119+
"iaml_ranger", "iaml_rpart", "iaml_glmnet", "iaml_xgboost"
120+
]
119121
instance : str
120122
A valid instance for the scenario. See `self.benchset.instances`.
121123
https://slds-lmu.github.io/yahpo_gym/scenarios.html#instances
122124
rng : np.random.RandomState, int, None
123125
"""
126+
127+
assert scenario.startswith('rbv2_') or scenario.startswith('iaml_'), \
128+
'Currently, we only support the experiments with rbv2_ and iaml from yahpo. ' \
129+
f'The scenario has to start with either rbv2_ or iaml_, but was {scenario}'
130+
124131
from hpobench.util.data_manager import YAHPODataManager
125132
self.data_manager = YAHPODataManager(data_dir=data_dir)
126133
self.data_manager.load()

hpobench/util/data_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ class YAHPODataManager(DataManager):
987987
def __init__(self, data_dir: Union[Path, str, None]):
988988
if data_dir is None:
989989
data_dir = hpobench.config_file.data_dir / "yahpo_data"
990-
self.data_dir = data_dir
990+
self.data_dir = Path(data_dir)
991991

992992
super(YAHPODataManager, self).__init__()
993993

0 commit comments

Comments
 (0)