Added grid generation utlity for ConfigSpaces#142
Conversation
|
Two minor remarks:
|
|
Thanks for the feedback!
|
|
Hi, is this going to be merged? |
|
Good question @Neeratyoy. We should probably have a look at whether that's possible. @RaghuSpaceRajan is there a reason you chose this to be a class and not a function? Also, to have this merged we'd need some unit tests, especially for testing the behavior when a hyperparameter has a given quantization. |
On looking at it again, I think it was because there was a function called If you prefer, I can make grid generation be a function again, @mfeurer.
I will add these soon. |
Codecov Report
@@ Coverage Diff @@
## master #142 +/- ##
=======================================
Coverage 68.20% 68.20%
=======================================
Files 18 18
Lines 1774 1774
=======================================
Hits 1210 1210
Misses 564 564 Continue to review full report at Codecov.
|
| int1 = UniformIntegerHyperparameter(name='int1', lower=10, upper=100, log=True) | ||
| ord1 = OrdinalHyperparameter(name='ord1', sequence=['1', '2', '3']) | ||
|
|
||
| cs.add_hyperparameters([float1, int1, cat1, ord1, const1]) |
There was a problem hiding this comment.
Could you please check for a few extreme cases, too? Such as only numerical, only categorical, only constant, only a single hyperparameter, no hyperparameters yet?
There was a problem hiding this comment.
For the case of no hyperparameters, in get_cartesian_product, itertools.product() returns a single empty tuple element (I expected 0 elements) here: https://github.com/RaghuSpaceRajan/ConfigSpace/blob/19144c34b4b0cce2e9df1bb66943bbd17392c818/ConfigSpace/util.pyx#L566 which leads to a single empty Configuration being generated in the grid. Should we check for this and make sure no configuration is returned?
There was a problem hiding this comment.
Should we check for this and make sure no configuration is returned?
Yes, I think so.
No description provided.