flairNLP / flair

A very simple framework for state-of-the-art Natural Language Processing (NLP)
https://flairnlp.github.io/flair/
Other
13.93k stars 2.1k forks source link

Loading some Flair models causes "FileNotFoundError: [Errno 2] No such file or directory" #3187

Open alanakbik opened 1 year ago

alanakbik commented 1 year ago

When using Flair with Torch 2.0, our "oldest" models can no longer be loaded. This is because they serialized LSTM properties that no longer exist in Torch 2.0.

This issue tracks the process of identifying and fixing these models:

michaelgoeggelmann commented 1 year ago

ontonotes as well? Still works for me!

alanakbik commented 1 year ago

Ontonotes-large works, but the smaller LSTM-based ones do not seem to work in my setups.

michaelgoeggelmann commented 1 year ago

makes sense, I only used the large one. Thanks again!

sadanyh commented 1 year ago

Same here. The first example code for the flair library gives the same error: FileNotFoundError: [Errno 2] No such file or directory: 'ner'

mjackko commented 1 year ago

Could you please check de-ner-large? We started getting problems with it as well:

FileNotFoundError: [Errno 2] No such file or directory: 'de-ner-large'

TessDejaeghere commented 1 year ago

Hi! I'm encountering the same problem for "pos-multi":

FileNotFoundError: [Errno 2] No such file or directory: 'pos-multi'

pazzo83 commented 1 year ago

I am getting the same problem with "linker": FileNotFoundError: [Errno 2] No such file or directory: 'linker'

kkarski commented 1 year ago

Same problem with 'chunk'.

alanakbik commented 1 year ago

Hello @pazzo83 and @kkarski - I just tested "linker" and "chunk" in a fresh colab install of master branch, and they both work.

Unfortunately @TessDejaeghere the pos-multi is an old LSTM-based model that we haven't updated yet for torch-2.0. See issue text above.

spiu commented 11 months ago

I was having the same issue with flair 0.13.0 when trying to load the linker model, but this was due to a corrupted download. I fixed this going to ~/.flair/models and deleting the relevant files, for linker this was the linker folder and the corrupted zelda dataset