Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When installing edward using the default method (
pip install edward
) and using the tensorflow versions specified in the setup.py (tensorflow>=1.2.0rc0), I get the following for some of the get started code:Since Tensorflow released a v2.0 that has a different API, looks like the tensorflow dependency should be constrained to be <2.0 as is done here. This seems to work as expected but #882 is showing up when I run examples from the notebooks directory and elsewhere so perhaps this should be constrained further or that issue could be fixed in a separate PR.
Stacktrace
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) in 1 import tensorflow as tf ----> 2 from edward.models import Normal 3 4 W_0 = Normal(loc=tf.zeros([1, 2]), scale=tf.ones([1, 2])) 5 W_1 = Normal(loc=tf.zeros([2, 1]), scale=tf.ones([2, 1]))~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/init.py in
3 from future import print_function
4
----> 5 from edward import criticisms
6 from edward import inferences
7 from edward import models
~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/criticisms/init.py in
5 from future import print_function
6
----> 7 from edward.criticisms.evaluate import *
8 from edward.criticisms.ppc import *
9 from edward.criticisms.ppc_plots import *
~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/criticisms/evaluate.py in
7 import tensorflow as tf
8
----> 9 from edward.models import RandomVariable
10 from edward.util import check_data, get_session, compute_multinomial_mode,
11 with_binary_averaging
~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/models/init.py in
5 from future import print_function
6
----> 7 from edward.models.dirichlet_process import *
8 from edward.models.empirical import *
9 from edward.models.param_mixture import *
~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/models/dirichlet_process.py in
6
7 from edward.models.random_variable import RandomVariable
----> 8 from tensorflow.contrib.distributions import Distribution
9
10 try:
ModuleNotFoundError: No module named 'tensorflow.contrib'