Skip to content

Importing tensorflow probability is raising AttributeError: module 'gast' has no attribute 'Ellipsis' in tensorflow #552

@canyon289

Description

@canyon289

Importing tfp with new nightlies is raising an exception

Package Versions

tf-nightly-2-0-preview 2.0.0.dev20190908 pypi_0 pypi
tfp-nightly 0.9.0.dev20190908 pypi_0 pypi

Stack Trace

In [4]: import tensorflow_probability as tfp                                                                                                                                 
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-41494c8c96ff> in <module>
----> 1 import tensorflow_probability as tfp

~/miniconda3/envs/pymc4/lib/python3.6/site-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

~/miniconda3/envs/pymc4/lib/python3.6/site-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 edward2
     25 from tensorflow_probability.python import experimental
     26 from tensorflow_probability.python import glm

~/miniconda3/envs/pymc4/lib/python3.6/site-packages/tensorflow_probability/python/edward2/__init__.py in <module>
     30 
     31 # pylint: disable=wildcard-import
---> 32 from tensorflow_probability.python.experimental.edward2.generated_random_variables import *
     33 from tensorflow_probability.python.experimental.edward2.generated_random_variables import as_random_variable
     34 from tensorflow_probability.python.experimental.edward2.generated_random_variables import rv_dict

~/miniconda3/envs/pymc4/lib/python3.6/site-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

~/miniconda3/envs/pymc4/lib/python3.6/site-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

~/miniconda3/envs/pymc4/lib/python3.6/site-packages/tensorflow_probability/python/experimental/auto_batching/frontend.py in <module>
     50 from tensorflow.python.autograph.pyct import templates
     51 from tensorflow.python.autograph.pyct import transformer
---> 52 from tensorflow.python.autograph.pyct.common_transformers import anf
     53 
     54 TF_BACKEND = tf_backend.TensorFlowBackend()

~/miniconda3/envs/pymc4/lib/python3.6/site-packages/tensorflow_core/python/autograph/pyct/common_transformers/anf.py in <module>
     86 
     87 
---> 88 class AnfTransformer(transformer.Base):
     89   """Performs the conversion to A-normal form (ANF)."""
     90 

~/miniconda3/envs/pymc4/lib/python3.6/site-packages/tensorflow_core/python/autograph/pyct/common_transformers/anf.py in AnfTransformer()
    150       gast.Is, gast.IsNot, gast.In, gast.NotIn,
    151       # Other leaf nodes that don't make sense standalone.
--> 152       gast.expr_context, gast.Ellipsis,
    153   )
    154 

AttributeError: module 'gast' has no attribute 'Ellipsis'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions