GPy and GPyOpt import issues

271 Views Asked by At

I am trying to use GPy and GPyOpt (BayesianOptimisation()).

Whether i use Jupyter/Anaconda or Google Colab, i am having major problems even importing it.

I have tried all advice i have found so far and it seems to be a probem gong back some time.

Just a simple code like this:

# --- Load GPyOpt
from GPyOpt.methods import BayesianOptimization
import numpy as np

# --- Define your problem
def f(x): return (6*x-2)**2*np.sin(12*x-4)
domain = [{'name': 'var_1', 'type': 'continuous', 'domain': (0,1)}]

# --- Solve your problem
myBopt = BayesianOptimization(f=f, domain=domain)
myBopt.run_optimization(max_iter=15)
myBopt.plot_acquisition()

gives up an error:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-6bfb00d9a176> in <cell line: 2>()
      1 # --- Load GPyOpt
----> 2 from GPyOpt.methods import BayesianOptimization
      3 import numpy as np
      4 
      5 # --- Define your problem

ModuleNotFoundError: No module named 'GPyOpt'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.

I have tried to install and update GPy and Numpy (research indicates its a linked problem).

I have ensured i dont have multiple versions of each downloaded and so on but no luck.

Any help would be gretly appreciated. Thnak you

0

There are 0 best solutions below