Skip to content

Commit

Permalink
update SpaCy versions and verify pytorch 1.10 compatibility
Browse files Browse the repository at this point in the history
The old 1.x SpaCy is deprecated. So the version is upgraded to 3.x to facilitate recent experiments.
  • Loading branch information
hitvoice committed Mar 14, 2022
1 parent c3ea030 commit fa58c29
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ The motivation for this project is to offer a clean version of DrQA for the mach

## Requirements
- python >=3.5
- pytorch 0.4. Historical versions:
- pytorch >=0.4. Tested on pytorch 0.4 and pytorch 1.10. Historical versions:
- [DrQA with pytorch 0.3](https://github.com/hitvoice/DrQA/tree/4ad445276373173d7f5845352a4fff910bf1239e)
- [DrQA with pytorch 0.2](https://github.com/hitvoice/DrQA/tree/303bbfe43fe51d4e437aaeeecf734a8f9922d83e)
- numpy
- msgpack
- spacy 1.x
- spacy 3.x

## Quick Start
### Setup
Expand Down
2 changes: 1 addition & 1 deletion download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ for ((i=0;i<${#URLS[@]};++i)); do
done

# Download SpaCy English language models
python3 -m spacy download en
python3 -m spacy download en_core_web_md

2 changes: 1 addition & 1 deletion prepro.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def normalize_text(text):
def init():
"""initialize spacy in each process"""
global nlp
nlp = spacy.load('en', parser=False)
nlp = spacy.load('en_core_web_md')


def annotate(row, wv_cased):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy
msgpack-python
spacy<=1.9
spacy>=3

0 comments on commit fa58c29

Please sign in to comment.