google-research / robustness_metrics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How should `edward2` be installed?

batzner opened this issue · comments

I noticed this import in robustness_metrics/models/uncertainty_baselines.py:

from edward2.experimental import sngp

However, edward2/experimental is not covered by the the find_packages() call in edward2/setup.py, meaning that the experimental directory will not be installed by pip.

Therefore, I tried simply cloning the edward2 repository and setting the PYTHONPATH to its parent directory, such that import edward2.experimental works. This unfortunately caused these imports in edward2/experimental/sngp/__init__.py to fail:

from experimental.sngp.gaussian_process import *  # local file import
from experimental.sngp.normalization import *  # local file import
from experimental.sngp.utils import *  # local file import

These require experimental to be discoverable by the PYTHONPATH, but the path needs to be set to the parent directory of edward2 to make the from edward2.experimental import sngp import above work.

So, I am wondering what the recommended way to import edward2.experimental is and how you do it yourselves?

Good catch. It looks like a mistake that this codebase imports from edward2.experimental. We purposefully don't include that code into the library. I'll drop that dependence.