Closed MahdiNazemi closed 7 years ago
Looks like the distributions library in tensorflow.contrib
broke compatibility with the Edward code base. (The type error is basically forcing parent classes of any distribution to be Distribution first; it wasn't there before.)
The most immediate fix would be to downgrade to TensorFlow 0.11.0. Meanwhile I'll see if I can come up with a solution (or contact them). Thanks for raising the issue!
Thanks a lot for your prompt reply. I'll post here in case I can find another solution.
In the mean time, perhaps it would be good to make this dependency explicit in the python package so new users don't have to handle this themselves?
@fredcallaway I'm not sure this would make much difference. In my attempt to revert to an earlier version of Tensorflow (0.11.0) with pip, I discovered the only available versions of TF are 0.12 release candidates.
$ pip install tensorflow==
Collecting tensorflow==
Could not find a version that satisfies the requirement tensorflow== (from versions: 0.12.0rc0, 0.12.0rc1)
No matching distribution found for tensorflow==
If someone has other ideas about how to revert to 0.11.0 without compiling from source, I'm all ears!
The code giving rise to this error (https://github.com/tensorflow/tensorflow/commit/3cb343915a9726b943d2fbb45e26148e9b83fa0e#diff-f71a6ea6b5cca22cde7783b6c3511960R149) was never merged into TF 0.11 branch, therefore all 0.11 versions should be safe to use. You've probably compiled TF from the master branch, not from 0.11
branch. Reverting your TF to latest 0.11 (e.g. pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp35-cp35m-linux_x86_64.whl
) would probably fix it.
The good news about the bug is that it's been fixed now in the master branch (https://github.com/tensorflow/tensorflow/commit/77cfa97ac784212130e97bc6fa9e6f8acfc86c08). But because there exist other incompatibilities in 0.12 and master, edward
doesn't work by default, so do not upgrade to 0.12 for now, or follow https://github.com/blei-lab/edward/pull/374 if you do.
@gokceneraslan appreciate this feedback! I followed your pip install suggestion using the URL and got TF reverted to 0.11.0. would still be nice if the stock pip install edward
would take care of grabbing the appropriate version of TF for the available version of edward.
@diehl: good idea. 82e534d prevents installing edward with 0.12.0rc0
or 0.12.0rc1
; i also added a note to the website's getting started. edward version 1.1.6 is a hot fix incorporating this commit.
@dustinvtran I just attempted pip install edward
on another machine and am seeing the following:
$ pip install -U edward
Collecting edward
Downloading edward-1.1.6-py2-none-any.whl (51kB)
100% |████████████████████████████████| 61kB 407kB/s
Requirement already up-to-date: six>=1.10.0 in ./anaconda/envs/DataGuild/lib/python2.7/site-packages (from edward)
Collecting tensorflow!=0.12.0rc0,!=0.12.0rc1,>=0.11.0rc0 (from edward)
Could not find a version that satisfies the requirement tensorflow!=0.12.0rc0,!=0.12.0rc1,>=0.11.0rc0 (from edward) (from versions: 0.12.0rc0, 0.12.0rc1)
No matching distribution found for tensorflow!=0.12.0rc0,!=0.12.0rc1,>=0.11.0rc0 (from edward)
As you can see, it's breaking due to the fact that you can only pip install
the 0.12 release candidates for Tensorflow presently.
Hi, On Ubuntu, using version 0.11.0 as instructed above still does not work. export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl 285 sudo pip install --upgrade $TF_BINARY_URL 286 sudo pip install --upgrade edward
TypeError Traceback (most recent call last)
Problem is, edward ignores my existing Tensorflow and installs version 12: root@cto-datascience:~/dev# pip install --ignore-installed --upgrade edward Collecting edward Using cached edward-1.1.6-py2-none-any.whl Collecting tensorflow!=0.12.0rc0,!=0.12.0rc1,>=0.11.0rc0 (from edward) Using cached tensorflow-0.12.1-cp27-cp27mu-manylinux1_x86_64.whl
See @gokceneraslan answer to to it manually :)
As I wrote, I did exactly as suggested by @gokceneraslan. Still no luck.
it looks like you're still using tensorflow 0.12+ instead of 0.11. this is likely independent of the edward install. can you confirm by running in terminal, python -c "import tensorflow as tf; print(tf.__version__)"
?
Thanks, Found the issue. Must use: pip install $TF_BINARY_URL and NOT : sudo pip install $TF_BINARY_URL (which does not install under anaconda)
perfect!
i should have the compatibility changes for the latest tensorflow 1.0.0 out soon. so once 1.0.0 is the default install, we will no longer have to deal with these issues. (they are fixed in 1.0.0)
solved in Edward's upgrade to support 1.0.0 (v1.2.1).
Hi,
I just installed edward from source using the command
python setup.py install
. When I open python's interactive shell and enterimport edward
I get the following error:(I have installed tensorflow 0.11rc1 from source.)
Can you please help me solve the issue?