Redfield BERT Nodes

I’m trying to use the Redfield BERT Nodes and get the following error. I Installed the Python BERT-Tensorflow package, but Knime can’t seem to find it. I’m an amateur with Python, so I may be doing something wrong. I’m using Anaconda/

ERROR BERT Model Selector 0:171 Execute failed: An error occurred while trying to launch Python: Could not start Python kernel. Error during Python installation test: Library bert is missing.
2020-12-12 11:10:57.369352: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
2020-12-12 11:10:57.369370: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

Looks like you are missing the BERT library in your conda environment. Please refer to this blogpost to see which libraries are needed to run the BERT nodes: https://www.knime.com/blog/bert-text-classification-for-everyone#Installation

1 Like

I manually installed all of the packages listed in the blog you mentioned and still get the same error message. Here’s the installation for the BERT package:

(base) C:\Users\genef>pip install bert==2.2.0
Requirement already satisfied: bert==2.2.0 in c:\users\genef\anaconda3\lib\site-packages (2.2.0)
Requirement already satisfied: erlastic in c:\users\genef\anaconda3\lib\site-packages (from bert==2.2.0) (2.0.0)

I can’t find cudart64_101.dll anywhere on my system. do I need to do something to install it?

Hello @rfeigel,

It seems that you are trying to use GPU to run the code. In order to do this you need to install additional software for your GPU, basically you need to install CUDA and neural network processing libraries for it.
In our tests we used libcudNN 7.6.5 and CUDA 10.1. I would recommend you to use these versions. However feel free to try some other, I would be glad to know if there are other versions of CUDA software that makes it possible to run the code.

Unfortunately this process might be tedious and we can do nothing about it.

Best regards,
Artem.

1 Like

I don’t have a GPU on my laptop. I have a Intel Core i7 10th GEN CPU. I saw a switch somewhere to toggle off GPU, but can’t find it now.

Then you should probably create another CPU-based environment for deep learning. However using such a computationally expensive model as BERT might take eternity with CPU.

Anyway, if you are looking for a switch to force CPU usage it is here:
image

Best regards,
Artem.

I do have an NVIDIA GPU, albeit low level (GeForce MN250.) I installed CUDA and am still getting the same error message:

ERROR BERT Model Selector 0:171 Execute failed: An error occurred while trying to launch Python: Could not start Python kernel. Error during Python installation test: Library bert is missing.
2020-12-16 16:55:19.086542: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
2020-12-16 16:55:19.086562: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

Here are screen shots of the CUDA and Anaconda BERT installations. I’m lost.

Sorry GPU is MX250 not MN250.

Are you sure you have installed the package to the Python environment you use for TensorFlow in Knime?
Since based on your message:

(base) C:\Users\genef>pip install bert==2.2.0

it feels that this is a separate environment.

Regarding the CUDA related problem. Unfortunately CUDA installation might not be very clear and straightforward, but probably you could try to re-install CUDA and the related libraries.
I have also found these solutions for a similar problem, I hope they might be useful for you:


Please also pay attention to use CUDA 10.1 and libcudNN 7.6.5, since these are the versions we used for developing and testing the nodes.