hyperspace
hyperspace copied to clipboard
AttributeError: 'NoneType' object has no attribute 'log10'
Hello,
I used to use the package
scikit-optimize 0.5.2
and it worked fine.
When I try my same experiment but using
scikit-optimize 0.7.4
I have the following error:
File "/home/karahbit/ve-radical.hpo/lib/python3.6/site-packages/skopt/space/space.py", line 234, in __init__
self.log_base = np.log10(base)
TypeError: loop of ufunc does not support argument 0 of type NoneType which has no callable log10 method
AttributeError: 'NoneType' object has no attribute 'log10'
If I go back to 0.5.2, it stills works fine.
I am leaving this issue open here just in case.
Digging a bit further, I think HyperSpace needs to be updated to provide support for the latest versions of its dependencies, specifically for this issue:
File "/home/karahbit/ve-radical.hpo/lib/python3.6/site-packages/hyperspace/space/skopt/space.py", line 141, in __init__
super().__init__(low, high, prior, transform)
File "/home/karahbit/ve-radical.hpo/lib/python3.6/site-packages/skopt/space/space.py", line 234, in __init__
self.log_base = np.log10(base)
TypeError: loop of ufunc does not support argument 0 of type NoneType which has no callable log10 method
AttributeError: 'NoneType' object has no attribute 'log10'
We can see for the newest versions of skopt like 0.7.4, new parameters are introduced:
def __init__(self, low, high, prior="uniform", base=10, transform=None,
name=None, dtype=np.float)
And in previous versions of skopt like 0.5.2 (which is the one HyperSpace is working with), the function definition was:
def __init__(self, low, high, prior="uniform", transform=None, name=None)
Ah, thanks for reporting that @karahbit. Looks like I should pin the version of scikit-optimize to 0.5.2 for the short term, and start a new branch to support the newer version of the library.
This is addressed in #30 .