Breaks after upgrading to TensorFlow 1.2.0
See original GitHub issueWhile building docker images, noticed that sonnet breaks with the new version of TF 1.2.0.
root@a28ad161d26d:/# python
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:53:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sonnet as snt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/lib/python3.5/site-packages/sonnet/__init__.py", line 109, in <module>
from sonnet.python.ops.resampler import resampler
File "/opt/conda/lib/python3.5/site-packages/sonnet/python/ops/resampler.py", line 33, in <module>
tf.resource_loader.get_path_to_datafile("_resampler.so"))
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: /opt/conda/lib/python3.5/site-packages/sonnet/python/ops/_resampler.so: undefined symbol: _ZN10tensorflow15shape_inference16InferenceContext15WithRankAtLeastENS0_11ShapeHandleEiPS2_
TensorFlow was installed via pip, sonnet was compiled and installed from sources. Perhaps, updating the TF submodule with headers should solve this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
TensorFlow upgrade to 1.0.0 breaking import #7980 - GitHub
Gunan,. I tried all the upgrades in between 0.10.0, 0.11.0, and 0.12.0 and they all have the same problem. 0.9.0 still works when...
Read more >How to pip install old version of library(tensorflow)?
In case you want to install a "normal" release. then you can easily use the following command: pip install --upgrade tensorflow==1.3.0.
Read more >Migrate to TensorFlow 2
Upgrade your training, evaluation and model saving code to TF2 ... Programmatically upgrade some parts of your TF1.x code to TF2.
Read more >Changelog - pip documentation v22.3.1
Only calculate topological installation order, for packages that are going to be installed/upgraded. This fixes an AssertionError that occurred when determining ...
Read more >Release 1.3.1
Release 1.2.0 ... This is a breaking change from the behavior of RNNCells in TensorFlow versions ... ensure it raises no errors, and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you, Shuolongbj. Fortuneately, your post revealed one slight mishap, and I remembered another. My only errors were I did not checkout r1.2 in tensorflow (I instead checked out master), and when I did the configure files for bazel in Tensorflow, I realize I called the opt flags as command line arguments, rather than specify them in the configure file of tensorflow. This potentially desynchronized the Tensorflow and Sonnet configurations and probably resulted in the error. I can confirm that sonnet 1.2 installs successfully on mac with Tensorflow 1.2.0.
I added these flags as they are when the tensorflow configure file asks for optimizatoin flags to optimize my build for my mac (this is for my personal machine, these flags may no apply specifically to your machine. Note the syntax though ‘-m[flag]’):
-mavx -mavx2 -mfma -msse4.2
FYI. cd sonnet/tensorflow git checkout r1.2 ./configure bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg pip uninstall tensorflow pip install /tmp/tensorflow_pkg/tensorflow-1.2.0-cp36-cp36m-macosx_10_7_x86_64.whl cd …/ bazel build --config=opt //:install bazel-bin/install /tmp/sonnet_pkg pip uninstall sonnet pip install /tmp/sonnet_pkg/sonnet-1.2-py3-none-any.whl