Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Co-lab Import Dependency Errors #3

Open
sfilios opened this issue Jan 18, 2021 · 2 comments
Open

Co-lab Import Dependency Errors #3

sfilios opened this issue Jan 18, 2021 · 2 comments

Comments

@sfilios
Copy link

sfilios commented Jan 18, 2021

When running the https://colab.research.google.com/github/tensorchiefs/dl_book/blob/master/chapter_05/nb_ch05_02.ipynb notebook in colab, upon running the 4th cell there is an import error:

ImportError                               Traceback (most recent call last)

<ipython-input-19-4f70da3f4e95> in <module>()
      2 import numpy as np
      3 from sklearn.model_selection import train_test_split
----> 4 import tensorflow_probability as tfp
      5 
      6 get_ipython().magic('matplotlib inline')

4 frames

/usr/local/lib/python3.6/dist-packages/tensorflow_probability/__init__.py in <module>()
     73 
     74 # from tensorflow_probability.google import staging  # DisableOnExport
---> 75 from tensorflow_probability.python import *  # pylint: disable=wildcard-import
     76 from tensorflow_probability.python.version import __version__
     77 # pylint: enable=g-import-not-at-top

/usr/local/lib/python3.6/dist-packages/tensorflow_probability/python/__init__.py in <module>()
     22 from tensorflow_probability.python import debugging
     23 from tensorflow_probability.python import distributions
---> 24 from tensorflow_probability.python import experimental
     25 from tensorflow_probability.python import glm
     26 from tensorflow_probability.python import layers

/usr/local/lib/python3.6/dist-packages/tensorflow_probability/python/experimental/__init__.py in <module>()
     32 from __future__ import print_function
     33 
---> 34 from tensorflow_probability.python.experimental import auto_batching
     35 from tensorflow_probability.python.experimental import edward2
     36 from tensorflow_probability.python.experimental import mcmc

/usr/local/lib/python3.6/dist-packages/tensorflow_probability/python/experimental/auto_batching/__init__.py in <module>()
     22 from tensorflow_probability.python.experimental.auto_batching import allocation_strategy
     23 from tensorflow_probability.python.experimental.auto_batching import dsl
---> 24 from tensorflow_probability.python.experimental.auto_batching import frontend
     25 from tensorflow_probability.python.experimental.auto_batching import instructions
     26 from tensorflow_probability.python.experimental.auto_batching import liveness

/usr/local/lib/python3.6/dist-packages/tensorflow_probability/python/experimental/auto_batching/frontend.py in <module>()
     42 from tensorflow.python.autograph.converters import return_statements
     43 from tensorflow.python.autograph.core import converter
---> 44 from tensorflow.python.autograph.core import naming
     45 from tensorflow.python.autograph.pyct import anno
     46 from tensorflow.python.autograph.pyct import compiler

ImportError: cannot import name 'naming'


---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
@oduerr
Copy link
Member

oduerr commented Jan 18, 2021

Thanks for the report. The notebooks should work with the provided docker container. For colab you can comment out

#!pip install tensorflow_probability==0.8.0

in cell 3 for the time being.

@emurina shall we remove the cell 'pip install tensorflow_probability==0.8.0' since it's not needed for the docker container and it's causing problems for the current colab version TF 2.4 seems not to work with tfp 0.8.

@emurina
Copy link
Member

emurina commented Jan 21, 2021

the problem is that tensorflow 2.4 does not work together with tensorflow probability 0.8.0.
with few exceptions we tested all notebooks with the tensorflow 2.0.0 and tensorflow probability 0.8.0, so you could either downgrade tensorflow to 2.0.0 or upgrade to a newer version of tensorflow probability (0.12.1).

@emurina emurina closed this as completed Jan 21, 2021
@emurina emurina reopened this Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants