deepset-ai / FARM

:house_with_garden: Fast & easy transfer learning for NLP. Harvesting language models for the industry. Focus on Question Answering.
https://farm.deepset.ai
Apache License 2.0
1.74k stars 247 forks source link

Error Importing Inferencer #851

Closed Stefan-Pasch closed 3 years ago

Stefan-Pasch commented 3 years ago

Hi,

since today, I receive the following error when important Inferencer from farm.infer.:

_OSError: libtorch_cudacpp.so: cannot open shared object file: No such file or directory

I am running FARM on Colab. The error also occurs when installing FARM in the way specified in the FARM-Colab Tutorials:

_!pip install farm !pip install torch==1.5.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html_

When I ran the exact same code 3 days ago, there appeared no error.

Many thanks in advance!

libtorch_error

Timoeller commented 3 years ago

Hey Stefan, we also receive this error when our Haystack notebooks are used. Please have a look at this issue and if Bogdans answer also resolves your FARM colab problems: https://github.com/deepset-ai/haystack/issues/1786

Stefan-Pasch commented 3 years ago

Hi Timo, many thanks for your quick reply! In fact, the problem in my FARM colab was resolved when installing torch in the following way:

!pip install torch==1.10.0+cu111 -f https://download.pytorch.org/whl/cu111/torch_stable.html

Timoeller commented 3 years ago

Perfect.

Please be aware that other (possibly hidden) bugs could emerge when updating the torch version without thorough testing. We have experienced problems with TAPAS in Haystack when using some torch==1.10.X versions.

Serbernari commented 1 year ago

The problem of libtorch_cuda_cpp.so stays now in the Colab even with torch==1.10.0+cu111

upd: !pip install torch==1.10.0+cu111 torchvision==0.11.0 torchaudio==0.10.0 -f https://download.pytorch.org/whl/cu111/torch_stable.html helped