neuralcoref icon indicating copy to clipboard operation
neuralcoref copied to clipboard

compatibility with spaCy 3.0 ?

Open d5555 opened this issue 3 years ago • 32 comments

Is there going to be neuralcoref compatible with spaCy 3.0 ?

d5555 avatar Feb 04 '21 18:02 d5555

Yes! This is definitely on our road map :-) I'll actually pin this issue because I'm sure others are interested as well.

svlandeg avatar Feb 04 '21 18:02 svlandeg

Plus 1

asterbini avatar Feb 20 '21 06:02 asterbini

After some rough paches I am able to start neuralcoref with spacy 3 but I obviously get the error ''Trying to read a Model that was created with an incompatible version of Thinc'' Is there a way to convert the models to the new Thinc version used in Spacy 3?

asterbini avatar Feb 25 '21 23:02 asterbini

@asterbini : Due to the many internal changes between Thinc 7 and 8, and spaCy 2 and 3, I'm not sure this is going to be feasible. See also this discussion at the spaCy forum.

We have now started working on a coref component native in spaCy v3 though. This won't be finished tomorrow, but we're making progress. We're going to reuse what we can from this library (with attribution, ofcourse) and make sure it trains and runs with native Thinc models :-)

svlandeg avatar Feb 26 '21 08:02 svlandeg

I was starting to look for a way to export the neuralcoref model in spacy2 as text, and try to load it in spacy3 :) From your words this seems to be useless, thanks for letting me know.

asterbini avatar Feb 26 '21 09:02 asterbini

I'm not a 100% sure though. If you have a working PyTorch model, that might operate with Thinc's new shim layers, but you'll have to write a custom component to wrap it in spaCy...

svlandeg avatar Feb 26 '21 09:02 svlandeg

But why the neuralcoref models should depend on the spacy3 models implementation? From a cursory glance to the NeuralCoref annotator class it seems to me that it reads only properties of the doc tokens that have not changed from v2 to v3. Then unless thinc 8 is changed radically wrt 7, (and by mapping Relu to ReLu and Linear to Affine) perhaps there is a way to convert the binary data model to thinc 8. (and yet, as I am a newbie of thinc and neuralcoref an I am sure I could have missed something)

asterbini avatar Feb 26 '21 17:02 asterbini

@asterbini : Due to the many internal changes between Thinc 7 and 8, and spaCy 2 and 3, I'm not sure this is going to be feasible. See also this discussion at the spaCy forum.

We have now started working on a coref component native in spaCy v3 though. This won't be finished tomorrow, but we're making progress. We're going to reuse what we can from this library (with attribution, ofcourse) and make sure it trains and runs with native Thinc models :-)

Out of curiosity since I'm trying to integrate Spacy and Neuralcoref into a time-sensitive project, is the move to Spacy 3 going to take on the order of a couple of weeks, a couple of months, or a year? I'm not familiar with the amount of work necessary to do something like this.

KTRosenberg avatar Mar 25 '21 19:03 KTRosenberg

I'd estimate a month, a couple of months at most.

svlandeg avatar Mar 25 '21 23:03 svlandeg

Thanks! In that case, I might downgrade temporarily.

KTRosenberg avatar Mar 25 '21 23:03 KTRosenberg

I'd estimate a month, a couple of months at most.

That's great news! I can't wait :)

d5555 avatar Mar 26 '21 01:03 d5555

Wow. Can't wait to use neuralcoref with SpaCy V3!

ZhuoruLin avatar Apr 06 '21 15:04 ZhuoruLin

looking forward to this! thankyou!

jazzdup avatar Apr 08 '21 12:04 jazzdup

I'm staying with spaCy 2 until this comes out. Can't wait! Thanks for the great work!

telmomenezes avatar Apr 08 '21 14:04 telmomenezes

Also looking forward to this! Hoping to use this in my project with the en_core_web_trf pipeline, which is dependent on spaCy 3. Thanks indeed for the great work so far!

lauwauw avatar Apr 09 '21 09:04 lauwauw

This is an awesome project try on, waiting for the spacy 3.0 compartibility.

chinmaydas96 avatar Apr 26 '21 08:04 chinmaydas96

Hi @svlandeg, do you have approximate estimation when neuralcoref for spacy3 will be released ? Thanks in advance

grigvardanyan avatar May 11 '21 12:05 grigvardanyan

Following

Ar9av avatar Jun 04 '21 06:06 Ar9av

folloming

yutong-fei avatar Jun 04 '21 21:06 yutong-fei

Also following.

seanswyi avatar Jun 05 '21 02:06 seanswyi

Hi all, as a quick update that I also posted in a related thread.

While we (Explosion) originally intended to update neuralcoref in collaboration with HuggingFace (and @thomwolf had been very helpful with that), we've recently revamped spaCy to 3.0 and it turned out that quite a significant rewrite was necessary to support a native Thinc model in neuralcoref. Meanwhile also, research on coreference resolution had progressed further.

So long story short, we started working on a built-in coreference module that will be part of the core spaCy library. You can follow its development here: https://github.com/explosion/spaCy/pull/7264. You'll see that we've been actively working on this. Most of the code is written, but it needs some more debugging and fine-tuning.

I can't speak for HuggingFace and what they intend to do with neuralcoref going forward and whether they're planning more updates, but either way this will always be a useful library for the older versions of spaCy :-)

svlandeg avatar Jun 10 '21 20:06 svlandeg

Hi all, as a quick update that I also posted in a related thread.

While we (Explosion) originally intended to update neuralcoref in collaboration with HuggingFace (and @thomwolf had been very helpful with that), we've recently revamped spaCy to 3.0 and it turned out that quite a significant rewrite was necessary to support a native Thinc model in neuralcoref. Meanwhile also, research on coreference resolution had progressed further.

So long story short, we started working on a built-in coreference module that will be part of the core spaCy library. You can follow its development here: explosion/spaCy#7264. You'll see that we've been actively working on this. Most of the code is written, but it needs some more debugging and fine-tuning.

I can't speak for HuggingFace and what they intend to do with neuralcoref going forward and whether they're planning more updates, but either way this will always be a useful library for the older versions of spaCy :-)

That sounds good! Would a reasonable ETA be ~1 month for debugging and testing?

KTRosenberg avatar Jun 10 '21 20:06 KTRosenberg

It's always difficult to provide these kind of estimates, as priorities sometimes shift, and we definitely want to "battle test" this new feature properly before we'll make it public.

svlandeg avatar Jun 10 '21 20:06 svlandeg

Awesome to hear this is happening! Thank you for putting the work into this. Please let us know when you think you have a release date :)

dogberto avatar Jul 04 '21 05:07 dogberto

What is the status on this? Hopefully it's going well.

KTRosenberg avatar Jul 12 '21 18:07 KTRosenberg

Eagerly waiting for the core spacy3 integration. I can see that the pull request is out there and work in progress to merge. @KTRosenberg, you can track the progress here - https://github.com/explosion/spaCy/pull/7264

nilesh avatar Jul 13 '21 13:07 nilesh

Looking forward to see the spacy 3.0 or even 3.1 integration!✔

danyang-rainbow avatar Sep 08 '21 06:09 danyang-rainbow

@svlandeg do you have any news :) ?

grigvardanyan avatar Jan 03 '22 12:01 grigvardanyan

https://github.com/explosion/spaCy/pull/7264#issuecomment-986957673 ;-)

svlandeg avatar Jan 03 '22 14:01 svlandeg

Looking forward to using it in SpaCy 3.0

qhungngo avatar Jun 30 '22 11:06 qhungngo