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

WARNING:root:Failure to load the inference.so custom c++ tensorflow ops #217

Open
Matsika opened this issue Apr 23, 2024 · 11 comments
Open

Comments

@Matsika
Copy link

Matsika commented Apr 23, 2024

Hi,

I have tensorflow 2.15.0 and tensorflow_decision_forests 1.8.1 and according to the website, I know that these are compatible, but for some reason when I try import tensorflow_decision_forests as tfdf I keep getting the following error:
import tensorflow_decision_forests as tfdf
WARNING:root:Failure to load the inference.so custom c++ tensorflow ops. This error is likely caused the version of TensorFlow and TensorFlow Decision Forests are not compatible. Full error:/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/tensorflow/ops/inference/inference.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "", line 1, in
File "/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/init.py", line 64, in
from tensorflow_decision_forests import keras
File "/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/keras/init.py", line 53, in
from tensorflow_decision_forests.keras import core
File "/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/keras/core.py", line 62, in
from tensorflow_decision_forests.keras import core_inference
File "/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/keras/core_inference.py", line 36, in
from tensorflow_decision_forests.tensorflow.ops.inference import api as tf_op
File "/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/tensorflow/ops/inference/api.py", line 179, in
from tensorflow_decision_forests.tensorflow.ops.inference import op
File "/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/tensorflow/ops/inference/op.py", line 15, in
from tensorflow_decision_forests.tensorflow.ops.inference.op_dynamic import *
File "/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/tensorflow/ops/inference/op_dynamic.py", line 24, in
raise e
File "/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/tensorflow/ops/inference/op_dynamic.py", line 21, in
ops = tf.load_op_library(resource_loader.get_path_to_datafile("inference.so"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow/python/framework/load_library.py", line 54, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tensorflow.python.framework.errors_impl.NotFoundError: /global/scratch/users/tmatsika/bf_python/lib/python3.11/site-packages/tensorflow_decision_forests/tensorflow/ops/inference/inference.so: cannot open shared object file: No such file or directory

I have looked at the other issues and I didn't find a solution that worked for me. I'm using a system with linux arm64 architecture.

@Elainelovewatermelon
Copy link

I also have the same problem, did you figure it out?

@Matsika
Copy link
Author

Matsika commented Jun 28, 2024

No, I'm hoping that the developers will know how to fix the issue. I think the issue is that TensorFlow Decision Forests doesn't work on linux arm64 architecture, but it does work on Mac arm so I think it's something the developers may need to update so that it works on linux arm64.

@Elainelovewatermelon
Copy link

I find out that there is an extension called tensorflow in vscode, do you know if it also contains tensorflow decision forest?

@rstz
Copy link
Collaborator

rstz commented Jun 28, 2024

Hi, while I believe that it is possible to compile TF-DF on ARM64 Linux, it's not something we've looked into in more detail. I might have a closer look, but absolutely no promises, and I don't think we have the bandwidth to officially support another architecture at this time for TF-DF.

I find out that there is an extension called tensorflow in vscode, do you know if it also contains tensorflow decision forest?

Very likely not.

@ekworp
Copy link

ekworp commented Jul 12, 2024

I still have this problem on 1.9

@HashemZn-04
Copy link

I have this exact problem but on Windows, have you found a solution to this yet?

@buzhidubai
Copy link

I also encountered the same problem, on windows, is there a suitable solution now?

@fahminlb33
Copy link

fahminlb33 commented Jul 20, 2024

I also encountered the same problem, it turns out to be a compatibility issue. If you install tensorflow using conda and tensorflowjs using pip, this issue still happens even when you have a compatible version.

My workaround is uninstall tensorflow using conda remove tensorflow and reinstalling it using pip install tensorflow==2.15.0 tensorflowjs

Edit: I'm running the command in Ubuntu 22 WSL 2 and miniforge env

@TheRealCasmat
Copy link

TheRealCasmat commented Sep 8, 2024

I'm starting to face this issue using tfjs on arm64 ubuntu. inference.so for tfdf couldn't be found. This should be looked into further

@nicklasb
Copy link

nicklasb commented Sep 9, 2024

@TheRealCasmat, @rstz
Same issue here on Windows 11.

@Gpaio574
Copy link

Same issue on Windows 11.

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

10 participants