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

tensorflow_text not importing correctly #4640

Closed
Pixelz22 opened this issue Jun 17, 2024 · 1 comment
Closed

tensorflow_text not importing correctly #4640

Pixelz22 opened this issue Jun 17, 2024 · 1 comment

Comments

@Pixelz22
Copy link

Describe the current behavior
I'm attempting to import the tensorflow_text library into a notebook. It's known to be a little screwy, but I've gotten it to work on TensorFlow's own images. I'm trying to use Google Colab because my computer is incredibly slow. I've called pip to import the library, and the import statement seems to work fine, but then I get an obscure error about some random symbol not being defined. Here are some snippets for reference:
My code:

!pip install tensorflow_text

import tensorflow.keras as keras
import tensorflow_datasets as tfds
import tensorflow_text

The output:

ImportError                               Traceback (most recent call last)
[<ipython-input-15-2ee9e708056f>](https://localhost:8080/#) in <cell line: 8>()
      6 
      7 import tensorflow_datasets as tfds
----> 8 import tensorflow_text
      9 
     10 

[/usr/local/lib/python3.10/dist-packages/tensorflow_text/__init__.py](https://localhost:8080/#) in <module>
     18 
     19 # pylint: disable=wildcard-import
---> 20 from tensorflow_text.core.pybinds import tflite_registrar
     21 from tensorflow_text.python import keras
     22 from tensorflow_text.python import metrics

ImportError: /usr/local/lib/python3.10/dist-packages/tensorflow_text/core/pybinds/tflite_registrar.so: undefined symbol: _ZN4absl12lts_2021032420raw_logging_internal21internal_log_functionE

Describe the expected behavior
Preferably, it would be really nice if we could install tensorflow_text without all the hassle and bugs, considering it is one of the great tokenizers out there.

What web browser you are using
Brave, which runs Chromium

Additional context
Link to a minimal, public, self-contained notebook that reproduces this issue.

  • Share the file using your GitHub account using File > Save a copy as a GitHub Gist.
  • or Share Drive notebooks using the Share button then 'Get Shareable Link'.
@Pixelz22 Pixelz22 added the bug label Jun 17, 2024
@mayankmalik-colab
Copy link
Contributor

When do you see that error? I am able to install and import tensorflow_text just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants