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

AttributeError when preprocessing data for DrQA #33

Closed
mojesty opened this issue Nov 28, 2017 · 7 comments
Closed

AttributeError when preprocessing data for DrQA #33

mojesty opened this issue Nov 28, 2017 · 7 comments

Comments

@mojesty
Copy link

mojesty commented Nov 28, 2017

Firstly i ran download.sh, and it succesfully downloaded glove and train/dev jsons for SQuAD. However, python prepro.py gave me this:

Traceback (most recent call last):
  File "prepro.py", line 243, in <module>
    vocab_tag = list(nlp.tagger.tag_names)
AttributeError: 'Tagger' object has no attribute 'tag_names'

My Spacy version is 2.0.3, and it seems like something broke in update from 1.x that is written in requirements, and I didn't succeed in fixing it myself.
Any suggests?

@taoleicn
Copy link
Contributor

taoleicn commented Dec 1, 2017

Hi,
The prepro.py code is taken from https://github.com/hitvoice/DrQA and the author is @hitvoice
The required spacy version is 1.x according to the README.

@hitvoice any ideas?

@hitvoice
Copy link

hitvoice commented Dec 2, 2017

prepro.py has been updated a month ago in https://github.com/hitvoice/DrQA. With spacy 2.0, the new script finishes without error, but it takes more than an hour to finish data processing (while with spacy 1.9 it takes only 70 seconds). I'm not able to find out what exactly is the problem and how to accelerate it even after following the "Migrating from spaCy 1.x" guide.
Related issues in spacy: #1371 #1572, which are still open.
I suggest sticking to spacy 1.9 until the spacy development team fixes related performance issues.

@mojesty
Copy link
Author

mojesty commented Dec 2, 2017

Thanks @hitvoice . Do I need to update any other files to make it work with spaCy 2.x? I would like to use the same library version throughout my projects to avoid compatibility problems.

@hitvoice
Copy link

hitvoice commented Dec 4, 2017

No, only "prepro.py".

@aviczhl2
Copy link

aviczhl2 commented Dec 4, 2017

@hitvoice when replacing the prepro.py with your new version, a new bug occurs.

Traceback (most recent call last):
File "lib/python3.5/site-packages/cupy/cuda/stream.py", line 113, in del
if self.ptr:
AttributeError: 'Stream' object has no attribute 'ptr'
if self.ptr:
AttributeError: 'Stream' object has no attribute 'ptr'

I'd like to know how to deal with it... Many thanks...

@mojesty
Copy link
Author

mojesty commented Dec 5, 2017

I used @hitvoice 's repo for the DrQa and it worked well, so consider this option also.

@lenovopast17
Copy link

@aviczhl2 i think you should upgrade your NVIDIA driver, it worked for me.

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

No branches or pull requests

6 participants