importing likelihoods fails

96 views Asked by At

I am trying to get in touch with Gaussian Process Classification and try to reproduce the example from https://docs.gpytorch.ai/en/stable/examples/01_Exact_GPs/GP_Regression_on_Classification_Labels.html

Following their code, I want to import the Dirichlet Classification Likelihood by

from gpytorch.likelihoods import DirichletClassificationLikelihood

However, this seems not to work, and I get the Error:

ImportError: cannot import name 'DirichletClassificationLikelihood' 
from 'gpytorch.likelihoods' (/Library/Frameworks/Python.framework/Versions/3.8/
lib/python3.8/site-packages/gpytorch/likelihoods/__init__.py)

also other likelihoods as FixedNoiseGaussianLikelihood does not work.

I tried to reinstall GPyTorch in Conda, which did not help. but importing i.e GaussianLikelihood works without problems. Did somebody had similar problems, or knows how to solve this Error?

EDIT: It only does not work for Jupyter Notebook.

Best

1

There are 1 answers

0
dpendi On BEST ANSWER

Solved it.

The paths of Jupyter Notebook did not include the new updated library. After updating paths to the wanted folder by

import sys
sys.paths.append("....")

it worked nice.

Best