automl / automl/HPOlibConfigSpace

create configuration from HPOlib pkl

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
8
Forks
9
PR merge metrics
No merged PRs in 30d

Description

I want to create configuration from a HPOlib-pkl-file :

hpolib_pkl = cPickle.load(open(path_to_pkl,"r"))
config = configuration_space.Configuration(config_space, hpolib_pkl["trials"][0]["params"])

But it crashes with the error message:

Value 1.0, for instantiation of hyperparameter 'random_forest:max_features, Type: UniformFloat, Range: [0.5, 5.0], Default: 1' is not a legal value

Did I miss something? Are the dictionaries for a parameter instantiation created by HPOlib in a different format than HPOlibConfigSpace expects?

The HPOlib dictionary looks as follows:

In [350]: hpolib_pkl["trials"][0]["params"]
Out[350]: OrderedDict([('classifier', 'random_forest'), ('imputation:strategy', 'mean'), ('preprocessor', 'None'), ('random_forest:bootstrap', 'True'), ('random_forest:criterion', 'gini'), ('random_forest:max_depth', 'None'), ('random_forest:max_features', '1.0'), ('random_forest:max_leaf_nodes', 'None'), ('random_forest:min_samples_leaf', '1'), ('random_forest:min_samples_split', '2'), ('random_forest:n_estimators', '100'), ('rescaling:strategy', 'min/max')])

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the configuration_space.Configuration constructor and the validation of hyperparameter values, using the HPOlib pickle example in the issue as the reproduction case. Compare the parameter dictionary format with the format accepted by Configuration, then verify that the reported random_forest values are handled consistently and add or run a focused regression test if the project provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.