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

cant load deep learning model #1064

Open
helplessness opened this issue Nov 28, 2023 · 7 comments
Open

cant load deep learning model #1064

helplessness opened this issue Nov 28, 2023 · 7 comments
Labels
question There's no such thing as a stupid question

Comments

@helplessness
Copy link

[Wapiti] Loading model: "/data1/tf_data/pro/project/citation/grobid-master/grobid-home/models/reference-segmenter/model.wapiti" ERROR [2023-11-28 09:57:51,378] org.grobid.core.jni.JEPThreadPool: JEP initialization failed ! jep.JepException: <class 'ImportError'>: Traceback (most recent call last): ! File "/home/phoenix/anaconda3/envs/grobid/lib/python3.9/site-packages/tensorflow/python/pywrap_tensorflow.py", line 62, in <module> ! from tensorflow.python._pywrap_tensorflow_internal import * ! ImportError: /home/phoenix/anaconda3/envs/grobid/lib/python3.9/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyThread_tss_alloc ! ! ! Failed to load the native TensorFlow runtime. ! See https://www.tensorflow.org/install/errors for some common causes and solutions. ! If you need help, create an issue at https://github.com/tensorflow/tensorflow/issues and include the entire stack trace above this error message. ! at /home/phoenix/anaconda3/envs/grobid/lib/python3.9/site-packages/tensorflow/python/pywrap_tensorflow.<module>(pywrap_tensorflow.py:78) ! at /home/phoenix/anaconda3/envs/grobid/lib/python3.9/site-packages/tensorflow/python/__init__.<module>(__init__.py:36) ! at /home/phoenix/anaconda3/envs/grobid/lib/python3.9/site-packages/tensorflow/__init__.<module>(__init__.py:37) ! at /data1/tf_data/pro/project/citation/delft-master/delft/utilities/Embeddings.<module>(Embeddings.py:17) ! at <string>.<module>(<string>:1) ! at jep.Jep.eval(Native Method) ! at jep.Jep.eval(Jep.java:312) ! at org.grobid.core.jni.JEPThreadPool.initializeJepInstance(JEPThreadPool.java:89) ! at org.grobid.core.jni.JEPThreadPool.createJEPInstance(JEPThreadPool.java:113) ! at org.grobid.core.jni.JEPThreadPool.getJEPInstance(JEPThreadPool.java:151) ! at org.grobid.core.jni.DeLFTModel$InitModel.run(DeLFTModel.java:53) ! at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ! at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ! at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ! at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ! at java.base/java.lang.Thread.run(Thread.java:829) Model path: /data1/tf_data/pro/project/citation/grobid-master/grobid-home/models/reference-segmenter/model.wapiti [Wapiti] Loading model: "/data1/tf_data/pro/project/citation/grobid-master/grobid-home/models/figure/model.wapiti" Model path: /data1/tf_data/pro/project/citation/grobid-master/grobid-home/models/figure/model.wapiti [Wapiti] Loading model: "/data1/tf_data/pro/project/citation/grobid-master/grobid-home/models/table/model.wapiti" Model path: /data1/tf_data/pro/project/citation/grobid-master/grobid-home/models/table/model.wapiti [Wapiti] Loading model: "/data1/tf_data/pro/project/citation/grobid-master/grobid-home/models/funding-acknowledgement/model.wapiti" Model path: /data1/tf_data/pro/project/citation/grobid-master/grobid-home/models/funding-acknowledgement/model.wapiti <===========--> 91% EXECUTING [2m 28s]
python : 3.9

I have received the above error. Anyone know how to solve it?

@kermitt2
Copy link
Owner

Hi @helplessness !

Did you follow the instructions https://grobid.readthedocs.io/en/latest/Deep-Learning-models/ for installing the DL environment?

@helplessness
Copy link
Author

yes
I follow it

Hi @helplessness !

Did you follow the instructions https://grobid.readthedocs.io/en/latest/Deep-Learning-models/ for installing the DL environment?

@helplessness
Copy link
Author

Hi @helplessness !

Did you follow the instructions https://grobid.readthedocs.io/en/latest/Deep-Learning-models/ for installing the DL environment?

I wonder if it's a problem with a library version。but I follow it

@kermitt2
Copy link
Owner

Ok then next questions, can you describe your environment: OS, JDK version, Python & CUDA version, which virtualenv?

Did you use the script under ./grobid-home/scripts/install_jep_lib.sh to install JEP ? On my side I am still using JEP 4.0.2 as in the script, and I have not tried with more recent versions.

@helplessness
Copy link
Author

Ok then next questions, can you describe your environment: OS, JDK version, Python & CUDA version, which virtualenv?

Did you use the script under ./grobid-home/scripts/install_jep_lib.sh to install JEP ? On my side I am still using JEP 4.0.2 as in the script, and I have not tried with more recent versions.

linux 22.04
jdk 11
python 3.9 with conda
cuda 12.2
and I use grobid-home/scripts/install_jep_lib.sh to install JEP
I suspect it's the tensorflow version, but I don't know much about it.

@helplessness
Copy link
Author

Hi, @kermitt2 ,thank you for your reply. I solved the problem of using deep learning models using Docker. But I think my problem still exists.I want to use deep learning models because I feel that I cannot accurately identify images and attachments. But I think this problem still exists like this picture. Do I have any good ways to solve this problem?

1701306980158

@lfoppiano
Copy link
Collaborator

You can use the deep learning models using the docker image: grobid/grobid:.... see: https://grobid.readthedocs.io/en/latest/Grobid-docker/#deep-learning-and-crf-image

You can also tune more in detail what DL model to use by providing your configuration mounted as a volume when you run the container: https://grobid.readthedocs.io/en/latest/Grobid-docker/#configure-using-the-yaml-config-file

@lfoppiano lfoppiano added the question There's no such thing as a stupid question label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question There's no such thing as a stupid question
Projects
None yet
Development

No branches or pull requests

3 participants