Commit 550e4f21 authored by Chen Chen's avatar Chen Chen Committed by A. Unique TensorFlower
Browse files

Catch tf.text NotFoundError:

tensorflow.python.framework.errors_impl.NotFoundError: /usr/local/lib/python3.6/dist-packages/tensorflow_text/python/metrics/_text_similarity_metric_ops.so: undefined symbol: _ZN10tensorflow6StatusC1ENS_5error4CodeEN4absl12lts_2021032411string_viewEOSt6vectorINS_10StackFrameESaIS7_EE

PiperOrigin-RevId: 368978629
parent c52a287f
......@@ -22,6 +22,9 @@ try:
import tensorflow_text as text # pylint: disable=g-import-not-at-top
except ImportError:
text = None
except tf.errors.NotFoundError as e:
logging.warn("Encountered error when importing tensorflow_text: %s", e)
text = None
def _check_if_tf_text_installed():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment