question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deep Learning Pretrained Pipelines Failing to Load

See original GitHub issue

Description I have an issue that seems specifically related to the deep learning (“_dl”) pretrained pipelines.

Specifically if I run the following: pipeline = PretrainedPipeline(‘explain_document_ml’, lang=‘en’) it runs fine, if however I run pipeline = PretrainedPipeline(‘explain_document_dl’, lang=‘en’)

I get the following error:

py4j.protocol.Py4JJavaError: An error occurred while calling z:com.johnsnowlabs.nlp.pretrained.PythonResourceDownloader.downloadPipeline.
: java.lang.UnsatisfiedLinkError: Cannot find TensorFlow native library for OS: linux, architecture: x86_64. See https://github.com/tensorflow/tensorflow/tree/master/tensorflow/java/README.md for possible solutions (such as building the library from source). Additional information on attempts to find the native library can be obtained by adding org.tensorflow.NativeLibrary.DEBUG=1 to the system properties of the JVM.

Any ideas why this is occurring just for the deep learning libraries?

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce

from sparknlp.base import *
from sparknlp.annotator import *              
from sparknlp.pretrained import PretrainedPipeline
import sparknlp

spark = sparknlp.start()
pipeline = PretrainedPipeline('explain_document_dl', lang='en')

Context Your Environment

Spark NLP version: 2.7.4

Apache NLP version: Java version (java -version): openjdk version “1.8.0_282” OpenJDK Runtime Environment (build 1.8.0_282-b08) OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)

Setup and installation (Pypi, Conda, Maven, etc.): Followed steps in:

java -version conda create -n sparknlp python=3.6 -y conda activate sparknlp pip install spark-nlp==2.7.4 pyspark==2.4.7

Operating System and version: NAME=“Red Hat Enterprise Linux Server” VERSION=“7.3 (Maipo)” ID=“rhel” ID_LIKE=“fedora” VERSION_ID=“7.3”

Link to your project (if any):

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cfoleyiecommented, Feb 24, 2021

Ok understood, thank you.

0reactions
maziyarpanahicommented, Feb 24, 2021

You are welcome.

Read more comments on GitHub >

github_iconTop Results From Across the Web

load NerDLModel pipeline fail due to glove model missing #820
Possible Solution. I think that the model need the glove embedding used for the french model. But i can't find it on the...
Read more >
Spark-nlp: can't load pretrained recognize entity model from ...
You are trying to load a pre-trained pipeline inside an annotator. There are two types of pre-trained resources: model and pipeline.
Read more >
Fixing Your Machine Learning Model's Failure Points
We'll start by loading a simple MNIST model in TensorFlow that we'll use for the rest of the article. In our case, we...
Read more >
Pipelines - Hugging Face
The pipelines are a great and easy way to use models for inference. ... This pipeline can currently be loaded from pipeline() using...
Read more >
Save and load trained models - ML.NET | Microsoft Learn
However, once the application stops running, if the model is not saved somewhere locally or remotely, it's no longer accessible. Typically ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found