Closed oonisim closed 1 year ago
Hi @oonisim,
Your message falls right around the release of "tensorflow-decision-forests" 0.2.0, so wonder if this could be related to it.
Would you mind:
Hi @achoum, please refer to the result below. This time I switched to Python venv (not virtualenv, etc) and pip only to make sure anaconda is not the cause.
Basically the same error.
$ $ python --version
Python 3.8.10
$ pip list | grep tensorflow
tensorflow 2.7.0
tensorflow-datasets 4.4.0
tensorflow-decision-forests 0.2.0
tensorflow-estimator 2.7.0
tensorflow-io-gcs-filesystem 0.21.0
tensorflow-metadata 1.4.0
$ pip list | grep jupyter
jupyter 1.0.0
jupyter-client 7.0.6
jupyter-console 6.4.0
jupyter-core 4.9.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.2
import tensorflow as tf
import tensorflow_datasets as tfds
from wurlitzer import sys_pipes
tf.__version__
---
`2.7.0' # <--- PyPi tensorflow repository is updated to 2.7.0
tf.__path__
---
['/home/oonisim/venv/ml/lib/python3.8/site-packages/keras/api/_v2',
'/home/oonisim/venv/ml/lib/python3.8/site-packages/tensorflow_estimator/python/estimator/api/_v2',
'/home/oonisim/venv/ml/lib/python3.8/site-packages/tensorboard/summary/_tf',
'/home/oonisim/venv/ml/lib/python3.8/site-packages/tensorflow',
'/home/oonisim/venv/ml/lib/python3.8/site-packages/tensorflow/_api/v2']
import tensorflow_decision_forests as tfdf
---
otFoundError Traceback (most recent call last)
/tmp/ipykernel_48567/401816866.py in <module>
----> 1 import tensorflow_decision_forests as tfdf
~/venv/ml/lib/python3.8/site-packages/tensorflow_decision_forests/__init__.py in <module>
49 __author__ = "Mathieu Guillame-Bert"
50
---> 51 from tensorflow_decision_forests import keras
52 from tensorflow_decision_forests.component import py_tree
53 from tensorflow_decision_forests.component.builder import builder
~/venv/ml/lib/python3.8/site-packages/tensorflow_decision_forests/keras/__init__.py in <module>
47 from typing import Callable, List
48
---> 49 from tensorflow_decision_forests.keras import core
50 from tensorflow_decision_forests.keras import wrappers
51
~/venv/ml/lib/python3.8/site-packages/tensorflow_decision_forests/keras/core.py in <module>
58 from tensorflow.python.training.tracking import base as base_tracking # pylint: disable=g-direct-tensorflow-import
59 from tensorflow_decision_forests.component.inspector import inspector as inspector_lib
---> 60 from tensorflow_decision_forests.tensorflow import core as tf_core
61 from tensorflow_decision_forests.tensorflow.ops.inference import api as tf_op
62 from tensorflow_decision_forests.tensorflow.ops.training import op as training_op
~/venv/ml/lib/python3.8/site-packages/tensorflow_decision_forests/tensorflow/core.py in <module>
33 from tensorflow.python.distribute import parameter_server_strategy_v2
34 from tensorflow_decision_forests.tensorflow.distribute import tf_distribution_pb2
---> 35 from tensorflow_decision_forests.tensorflow.ops.training import api as training_op
36 from yggdrasil_decision_forests.dataset import data_spec_pb2
37 from yggdrasil_decision_forests.learner import abstract_learner_pb2
~/venv/ml/lib/python3.8/site-packages/tensorflow_decision_forests/tensorflow/ops/training/api.py in <module>
22 from tensorflow.python.framework import load_library
23 from tensorflow.python.platform import resource_loader
---> 24 tf.load_op_library(resource_loader.get_path_to_datafile("training.so"))
~/venv/ml/lib/python3.8/site-packages/tensorflow/python/framework/load_library.py in load_op_library(library_filename)
56 RuntimeError: when unable to load the library or get the python wrappers.
57 """
---> 58 lib_handle = py_tf.TF_LoadLibrary(library_filename)
59 try:
60 wrappers = _pywrap_python_op_gen.GetPythonWrappers(
NotFoundError: /home/oonisim/venv/ml/lib/python3.8/site-packages/tensorflow_decision_forests/tensorflow/ops/training/training.so: undefined symbol: _ZN10tensorflow11ResourceMgr8DoCreateERKSsNS_9TypeIndexES2_PNS_12ResourceBaseE
@oonisim
I tried with colab and I am able to import tfdf
successfully, You can take a look at the gist here.
P.S : The versions that I used are TF 2.8.0
and TFDF 0.2.4
Closing this since it is most likely outdated now.
Closing this since it is most likely outdated now.
Same problem, after using TF 2.8.0 and TFDF 0.2.4 it only shows this
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. explainable-ai-sdk 1.3.2 requires xai-image-widget, which is not installed. tfx-bsl 1.5.0 requires absl-py<0.13,>=0.9, but you have absl-py 1.4.0 which is incompatible. tfx-bsl 1.5.0 requires numpy<1.20,>=1.16, but you have numpy 1.20.3 which is incompatible. tfx-bsl 1.5.0 requires pyarrow<6,>=1, but you have pyarrow 6.0.1 which is incompatible. tensorflow-transform 1.5.0 requires absl-py<0.13,>=0.9, but you have absl-py 1.4.0 which is incompatible. tensorflow-transform 1.5.0 requires numpy<1.20,>=1.16, but you have numpy 1.20.3 which is incompatible. tensorflow-transform 1.5.0 requires pyarrow<6,>=1, but you have pyarrow 6.0.1 which is incompatible. tensorflow-transform 1.5.0 requires tensorflow!=2.0.,!=2.1.,!=2.2.,!=2.3.,!=2.4.,!=2.5.,!=2.6.*,<2.8,>=1.15.2, but you have tensorflow 2.8.0 which is incompatible. tensorflow-io 0.21.0 requires tensorflow<2.7.0,>=2.6.0, but you have tensorflow 2.8.0 which is incompatible. tensorflow-io 0.21.0 requires tensorflow-io-gcs-filesystem==0.21.0, but you have tensorflow-io-gcs-filesystem 0.32.0 which is incompatible. tensorflow-decision-forests 1.2.0 requires tensorflow~=2.11.0, but you have tensorflow 2.8.0 which is incompatible.
I believe that the issue you're seeing is the following: You are combining an outdated Tensorflow version (2.8.0) with an earlier TF-DF version (1.2.0). This is not possible since TF-DF and TF have to be in sync.
Possible solutions:
pip install --force-reinstall -v "tensorflow-decision-forests==0.2.4"
pip install --force-reinstall tensorflow-decision-forests
Environment
Anaconda virtual python environment with TF 2.6.0 installed.
Problem
Importing TF, TFDS are OK.
Importing the tensorflow_decision_forests causes the issue. The same symbol issues was reported in https://github.com/tensorflow/text/issues/385 as well.
Related
There is a suggestion that this could be TF version issue but not certain.