Closed marmg closed 9 months ago
With torch>=2.0 there is an existing bug in flair that makes flair POS mentions extractor fail: https://github.com/flairNLP/flair/issues/3187
torch>=2.0
flair
flair POS mentions extractor
Describe the bug The POS models for SequenceTagger in the Huggingface Hub are not updated for torch>=2.0
E AttributeError: 'dict' object has no attribute 'embedding_length'
To Reproduce
import spacy from zshot import PipelineConfig from zshot.mentions_extractor import MentionsExtractorFlair from zshot.mentions_extractor.mentions_extractor_flair import ExtractorType nlp = spacy.blank("en") config_zshot = PipelineConfig(mentions_extractor=MentionsExtractorFlair(ExtractorType.POS)) nlp.add_pipe("zshot", config=config_zshot, last=True) assert "zshot" in nlp.pipe_names doc = nlp("Test example text")
Expected behavior It should work without errors.
Summary
With
torch>=2.0
there is an existing bug inflair
that makesflair POS mentions extractor
fail: https://github.com/flairNLP/flair/issues/3187Describe the bug The POS models for SequenceTagger in the Huggingface Hub are not updated for
torch>=2.0
To Reproduce
Expected behavior It should work without errors.