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

_activation_ops.so: undefined symbol error when importing tensorflow_addons #753

Closed
martin-gorner opened this issue Dec 10, 2019 · 1 comment

Comments

@martin-gorner
Copy link

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Google Cloud AI Platform Notebooks, TF 2.0 image
  • TensorFlow version and how it was installed (source or binary): Google Cloud AI Platform Notebooks, TF 2.0 image
  • TensorFlow-Addons version and how it was installed (source or binary): 0.6.0, pip install
  • Python version: 3.5
  • Is GPU used? (yes/no): yes

Executing the following line in my notebook:
import tensorflow_addons as tfa
Generates the following error:
NotFoundError: /home/jupyter/.local/lib/python3.5/site-packages/tensorflow_addons/custom_ops/activations/_activation_ops.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
Full error message:
NotFoundError Traceback (most recent call last)
in
5 from matplotlib import pyplot as plt
6 import PIL.Image, PIL.ImageFont, PIL.ImageDraw
----> 7 import tensorflow_addons as tfa
8 AUTOTUNE = tf.data.experimental.AUTOTUNE
9 print("Tensorflow version " + tf.version)

~/.local/lib/python3.5/site-packages/tensorflow_addons/init.py in
19
20 # Local project imports
---> 21 from tensorflow_addons import activations
22 from tensorflow_addons import callbacks
23 from tensorflow_addons import image

~/.local/lib/python3.5/site-packages/tensorflow_addons/activations/init.py in
19 from future import print_function
20
---> 21 from tensorflow_addons.activations.gelu import gelu
22 from tensorflow_addons.activations.hardshrink import hardshrink
23 from tensorflow_addons.activations.lisht import lisht

~/.local/lib/python3.5/site-packages/tensorflow_addons/activations/gelu.py in
23
24 _activation_ops_so = tf.load_op_library(
---> 25 get_path_to_datafile("custom_ops/activations/_activation_ops.so"))
26
27

/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/framework/load_library.py in load_op_library(library_filename)
59 RuntimeError: when unable to load the library or get the python wrappers.
60 """
---> 61 lib_handle = py_tf.TF_LoadLibrary(library_filename)
62
63 op_list_str = py_tf.TF_GetOpList(lib_handle)

NotFoundError: /home/jupyter/.local/lib/python3.5/site-packages/tensorflow_addons/custom_ops/activations/_activation_ops.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs

@seanpmorgan
Copy link
Member

Same issue found here:
#676 (comment)

Thanks for reporting, we're aware of the issue and a long term fix is in the works (see RFC linked in that issue). A short term fix would be to try compiling TFA from source (but there are a few edge cases where it could still fail

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

2 participants