shon-otmazgin / fastcoref

MIT License
142 stars 25 forks source link

fastcoref 2.1.3 No compatible package found for spacy.lang.en.English object (spaCy v3.5.1) #30

Closed aaalexlit closed 1 year ago

aaalexlit commented 1 year ago

The latest version of fastcoref 2.1.3 spacy component seems to be broken

It's failing on nlp.add_pipe("fastcoref") step with

✘ No compatible package found for '<spacy.lang.en.English object at 0x7f4840098970>' (spaCy v3.5.1)

error

Here's a Colab notebook that reproduces the behavior

Current workaround: downgrading fastcoref to the previous version (2.1.1) see this notebook for reference

shon-otmazgin commented 1 year ago

@aryehgigi can you take a look here?

aryehgigi commented 1 year ago

@shon-otmazgin , actually this is not related to the two PRs recently added by me.. and im not familiar with the spacy component code parts but i can try to take a look if you want.

at a glance you dont upward-limit the spacy version in the setup.py, so maybe something has changed in the 3.5.1 version there that clashes with the spacy-component code.. one solution would be to disallow higher versions of spacy (e.g. spacy>=3.0.6,<3.5.0 in setup.py) than what you tested your code and trained your component with (if you want to support higher versions you would need to retrain anyway)

if you want to try and support version spacy==3.5.1 i can try and take a look maybe its fixable in the code and no need to limit the version but maybe you can take a look as well as you are more familiar with it?

aryehgigi commented 1 year ago

ok, actually it did have to do with my PR. i didnt know but the spacy-component creates aFCoref and passes it an nlp object which is of type Language and not str. Adding a PR to address this, but in any case you (@shon-otmazgin) should consider pinning down spacy's version

shon-otmazgin commented 1 year ago

@aaalexlit thanks for that!, i just release version 2.1.4, thanks to @aryehgigi fix you can it please?

aaalexlit commented 1 year ago

Amazing speed, guys, thank you for fixing that! I just re-run the notebook that was giving the error and I can confirm that it's fixed now