Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel dies on running doc = nlp(u"abc...xyz") #189

Closed
Viole-Grace opened this issue Jul 30, 2019 · 9 comments
Closed

Kernel dies on running doc = nlp(u"abc...xyz") #189

Viole-Grace opened this issue Jul 30, 2019 · 9 comments

Comments

@Viole-Grace
Copy link

I'm using jupyter notebook on gcloud, with a venv for package installation. System image - Ubuntu 16.04

Steps to recreate the error :

pip3 install neuralcoref

and then

`import spacy
import neuralcoref

nlp = spacy.load('en')

neuralcoref.add_to_pipe(nlp)
doc = nlp(u'Deepika has a dog. She loves him. The movie star has always been fond of animals')
doc..coref_clusters
doc.
.coref_resolved

`
I get the following warning first :

/home/cloud/anaconda/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: spacy.tokens.span.Span size changed, may indicate binary incompatibility. Expected 72 from C header, got 80 from PyObject
  return f(*args, **kwds)

and then, the jupyter kernel dies.

I have tried building from source, following the readme for --no-binary as well, still the same issue persists. Kernel dies.

Any insight as to why this is happening / how to change any code to make it work would be much appreciated.

Thanks!

@Viole-Grace
Copy link
Author

Viole-Grace commented Jul 31, 2019

Hi!
I have found that the kernel doesnt die on pipelining, but on using any of the ._. functions from the doc. :
doc=nlp(u'I have a dog, and I love her.') doc._.coref_clusters
The code runs perfectly without any problems for :

import spacy import neuralcoref nlp = spacy.load('en') neuralcoref.add_to_pipe(nlp)

Any work around would be great, thanks!

@Viole-Grace Viole-Grace changed the title Kernel dies on pipelining Kernel dies on running doc._. functions Jul 31, 2019
@vikrant094
Copy link

kernel is dying on doc=nlp(u'I have a dog, and I love her.'). not with ._. functions.

@Viole-Grace Viole-Grace changed the title Kernel dies on running doc._. functions Kernel dies on running doc = nlp(u"abc...xyz") Aug 5, 2019
@Viole-Grace
Copy link
Author

kernel is dying on doc=nlp(u'I have a dog, and I love her.'). not with ._. functions.

Okay, but either way - any luck solving the problem?

@fhopp
Copy link

fhopp commented Aug 6, 2019

Same problem here.

@fhopp
Copy link

fhopp commented Aug 6, 2019

@Viole-Grace @vikrant094 Try to downgrade spacy to 2.1.0.

pip uninstall spacy 
pip uninstall neuralcoref
pip install spacy==2.1.0 
pip install neuralcoref --no-binary neuralcoref

That did the trick for me.

@khadkechetan
Copy link

Thanks. It worked.

@svlandeg
Copy link
Collaborator

As a workaround for the incompatibility issue, you can indeed either downgrade spaCy to 2.1.0, or build neuralcoref from source if you want to use a more recent version of spaCy.

We plan on keeping the releases of neuralcoref and spaCy more in-sync in the future. Merging this with Issue #197.

@kr-prince
Copy link

@Viole-Grace @vikrant094 Try to downgrade spacy to 2.1.0.

pip uninstall spacy 
pip uninstall neuralcoref
pip install spacy==2.1.0 
pip install neuralcoref --no-binary neuralcoref

That did the trick for me.

As @fhopp mentioned his steps worked for me. But If you get an error like:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory error: command 'gcc' failed with exit status 1
Then run sudo apt-get install g++ or the equivalent command in windows. I am working on Ubuntu.

@fhopp
Copy link

fhopp commented Jun 1, 2020

@svlandeg solution (from source) also works. Following up on @kr-prince if you are on MAC OS and get the gcc error, you will likely need to download/update your MAC devtools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants