tensorflow / tensorflow/probability
Cannot import tensorflow_probability.
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
I'm using TensorFlow 1.140, I have installed tensorflow_probability 0.7. I'm using anaconda navigator for installing the packages and python 3.6.12.
ImportError Traceback (most recent call last)
in
1 import tensorflow as tf
2 from matplotlib import pyplot as plt
----> 3 import tensorflow_probability
4 # from sklearn import linear_model
5 # from functions import rademacher,print_w,get_data,ls,linf,getSupport,alg1,alg2, lassoCheck,ompCheck,Alg1Check,Alg2Check,plotPerformance,plotSaveAll,plotAll
~.conda\envs\tf_gpu\lib\site-packages\tensorflow_probability_init_.py in
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
~.conda\envs\tf_gpu\lib\site-packages\tensorflow_probability\python_init_.py in
19 from future import print_function
20
---> 21 from tensorflow_probability.python import bijectors
22 from tensorflow_probability.python import debugging
23 from tensorflow_probability.python import distributions
~.conda\envs\tf_gpu\lib\site-packages\tensorflow_probability\python\bijectors_init_.py in
21 # pylint: disable=unused-import,wildcard-import,line-too-long,g-importing-member
22
---> 23 from tensorflow_probability.python.bijectors.absolute_value import AbsoluteValue
24 from tensorflow_probability.python.bijectors.affine import Affine
25 from tensorflow_probability.python.bijectors.affine_linear_operator import AffineLinearOperator
~.conda\envs\tf_gpu\lib\site-packages\tensorflow_probability\python\bijectors\absolute_value.py in
19 from future import print_function
20
---> 21 import tensorflow.compat.v2 as tf
22
23 from tensorflow_probability.python.bijectors import bijector
~.conda\envs\tf_gpu\lib\site-packages\tensorflow_core_api\v2\compat\v2_init_.py in
31 from . import bitwise
32 from . import compat
---> 33 from . import config
34 from . import data
35 from . import debugging
~.conda\envs\tf_gpu\lib\site-packages\tensorflow_core_api\v2\compat\v2\config_init_.py in
8 import sys as _sys
9
---> 10 from . import experimental
11 from . import optimizer
12 from . import threading
~.conda\envs\tf_gpu\lib\site-packages\tensorflow_core_api\v2\compat\v2\config\experimental_init_.py in
8 import sys as _sys
9
---> 10 from tensorflow.python.eager.context import VirtualDeviceConfiguration
11 from tensorflow.python.framework.config import get_device_policy
12 from tensorflow.python.framework.config import get_memory_growth
ImportError: cannot import name 'VirtualDeviceConfiguration'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the import entry point in tensorflow_probability/init.py and the failing import in tensorflow_probability/python/bijectors/absolute_value.py. Reproduce the import in the reported Python 3.6.12 Anaconda environment, then verify whether a compatible installation can import tensorflow_probability without the VirtualDeviceConfiguration error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- anaconda, jupyter-notebook, matplotlib, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100