Closed matthew-mcateer closed 6 years ago
Hi Matthew , just referencing this issue as I have been trying to solve this for a while now.. #24 latest comment.
I'm sending a patch to directly import SeedStream (from tf.contrib.distributions).
To me an issue like this means that there are some non-hermetic assumptions we are making (i.e. we can import tensorflow internals) which don't seem to break internally, and break in some cases externally.
Trying to figure out what the best way forward for this is (I suspect even the line below: from tensorflow.python.ops.distributions import util as distributions_util, will cause an error after this change).
@matthew-mcateer
Hi Matthew, Tensorflow Probability currently depends on tf-nightly at the moment, hence right now the best way forward is to install tfp by pip install --upgrade tfp-nightly
The reason this (and other issues) are coming up is some of our code is in tensorflow core (tf distributions) and some lies in this repo. Hence, when we make changes to core and use them, we require tfp to depend on tf-nightly (so that we have these new changes). In the near future, we'll be having more stable TFP releases, depending on stable TF versions, so this will hopefully not be so much of an issue.
@michalisfrangos Just to confirm, what is the nightly version here (is this a recent nightly, or is this dependent on tf 1.8)?
Hi Srinivas,
There was another upgrade from tfp-nightly I believe... I have just upgraded using pip install --upgrade tfp-nightly:
WARNING:tensorflow:From C:\Users\name\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Use the retry module or similar alternatives.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-30196978ccf1> in <module>()
20 pdf = GaussianCopulaTriL(
21 loc=[0., 0.],
---> 22 scale_tril=[[1., 0.8], [0., 0.6]],
23 ).prob(coordinates)
24
<ipython-input-3-30196978ccf1> in __init__(self, loc, scale_tril)
6 loc=loc,
7 scale_tril=scale_tril),
----> 8 bijector=tfb.Invert(NormalCDF()),
9 validate_args=False,
10 name="GaussianCopulaTriLUniform")
<ipython-input-2-51fa940429dd> in __init__(self)
13 forward_min_event_ndims=0,
14 validate_args=False,
---> 15 name="NormalCDF")
16
17 def _forward(self, y):
TypeError: __init__() got an unexpected keyword argument 'forward_min_event_ndims'
Perhaps all these are related to the warning appearing on import?
Ok I think I have full picture here now:
For Google Colab, there's a known issue with Python 3 colabs that are using an older version of tf-nightly #35. What's recommended is to use Python 2 colabs, and that issue should go away.
For Windows, I think the windows version of tf-nightly is also behind (although for another reason).
I think right now what is recommended is either use Google colab with python 2, and/or pip install in a Linux environment.
I apologize for the back and forth on this! I think once we move to a more stable release cycle, issues like these will disappear.
Okay, it seems like this particular import problem has been fixed. There are a few others that have replaced it, but I think for now I'll close this issue.
I've been running into a bit of trouble with installing tensorflow_probability.
Installation works fine on Ubuntu 16.04, but trying to install it on Windows or Google Colab (for Python3, at least).
Whenever I try to import tensorflow_probability, it runs into an error like the following:
It appears that on Ubuntu, tf-nightly==1.9.0.dev20180509, tfp-nightly==0.0.1.dev20180510, & tb-nightly==1.9.0a20180426 are correctly installing. On any other machine, however, no version beyond 1.8.x is available from pip. This appears to be the source of the dependency errors, but so far it's defied installation using Anaconda and on Google Colab.
Any ideas what might be causing this? (the reason I've been trying to install it in other environments is that my specific Ubuntu machine just doesn't have decent CPU capacity, not to mention nonexistenc GPU capacity)