EmuKit / emukit

A Python-based toolbox of various methods in decision making, uncertainty quantification and statistical emulation: multi-fidelity, experimental design, Bayesian optimisation, Bayesian quadrature, etc.
https://emukit.github.io/emukit/
Apache License 2.0
605 stars 128 forks source link

ImportError: cannot import name 'Tester' from 'numpy.testing' #455

Closed fteich closed 1 year ago

fteich commented 1 year ago

Hi,

when i am trying to run the following line of code:

"from emukit.multi_fidelity.convert_lists_to_array import convert_xy_lists_to_arrays"

i get the following error:

"ImportError: cannot import name 'Tester' from 'numpy.testing' (C:\Users\User\pythonProjects\lib\site-packages\numpy\testing__init__.py)"

I am using python 3.9 (Anaconda) and numpy 1.23.5. Can anyone help?

Cheers, Fabian

apaleyes commented 1 year ago

Just tried exact same setup (python 3.9, numpy 1.23.5) and it worked fine. I suspect some sort of a python path issue. Try creating a new clean virtualenv, install emukit with all dependencies and see if the issue goes away

apaleyes commented 1 year ago

Make sure your numpy is actually <1.25, as there are reports of similar bugs in GPy recently: https://github.com/SheffieldML/GPy/issues/1004#issuecomment-1749487425

fteich commented 1 year ago

Thanks a lot for your help! Creating a clean virtualenv was the way to go. If further errors occur i will try to downgrade numpy.