automl / automl/HPOlibConfigSpace

get_array after get_default_configuration contains wrong values

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

Description

I was trying to setup a simple all-continuous PCS (code below).

```
import ConfigSpace as CS

cs = CS.ConfigurationSpace()

for i in range(5):
cs.add_hyperparameter(CS.UniformFloatHyperparameter('x%i'%i, i-1, i+1, i ))

default = cs.get_default_configuration()
print(cs.get_hyperparameters())
print(default.get_dictionary())
print(default.get_array())
```

Running above code, I get the following output (slightly reformatted to improve readability):

```
[ x0, Type: UniformFloat, Range: [-1.0, 1.0], Default: 0.0,
x1, Type: UniformFloat, Range: [0.0, 2.0], Default: 1.0,
x2, Type: UniformFloat, Range: [1.0, 3.0], Default: 2.0,
x3, Type: UniformFloat, Range: [2.0, 4.0], Default: 3.0,
x4, Type: UniformFloat, Range: [3.0, 5.0], Default: 4.0]
{'x2': 2.0, 'x3': 3.0, 'x4': 4.0, 'x0': 0.0, 'x1': 1.0}
[ 0.5 0.5 0.5 0.5 0.5]
```

The last line should be [0,1,2,3,4], but instead consists of 0.5 everywhere.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the Python snippet, then read the implementations of get_default_configuration, get_dictionary, and get_array to trace how default values are converted. Add or update a regression test for the reported case; done means get_array() returns [0, 1, 2, 3, 4] for the five default hyperparameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.