Flair Models can't be used

#2
by Var3n - opened

Hello,

I was trying out different models provided by hmTeams for NER but none of them can be used in flair with:

from flair.models import SequenceTagger

tagger = SequenceTagger.load("hmbert-64k/flair-hipe-2022-ajmc-de")

because you get ModuleNotFoundError: No module named 'flair.trainers.plugins'

Is there a way to prevent this? I have only found this https://github.com/flairNLP/flair/issues/3312 but this does not seem helpful in this case

hmBERT 64k org

Hi @Var3n ,

thanks for your interest in the NER models! It was indeed a bug with the Flair version I used for fine-tuning.

But with the latest master of Flair - the model can definitely be used. So it should be possible via:

$ pip3 install --upgrade git+https://github.com/flairNLP/flair.git

I tested it:

image.png

Please let me know if it was working :)

Thank you for the quick response @stefan-it . While updating didn't work, setting up a new environment (and using the nightly build for torch) solved the problem :)

Sign up or log in to comment