Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'log10' #28

Open
karahbit opened this issue Mar 27, 2020 · 3 comments
Open

AttributeError: 'NoneType' object has no attribute 'log10' #28

karahbit opened this issue Mar 27, 2020 · 3 comments

Comments

@karahbit
Copy link

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.

@karahbit
Copy link
Author

karahbit commented Mar 27, 2020

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)

@yngtodd
Copy link
Collaborator

yngtodd commented Mar 27, 2020

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.

@yngtodd
Copy link
Collaborator

yngtodd commented Jun 23, 2020

This is addressed in #30 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants