Skip to content

Commit 7f983e2

Browse files
authored
Fix spacy test. (#1008)
spacy has been upgraded to 3.x (fastai had a 2.x requirement but now support 3.x which upgraded spacy.)
1 parent 8d00db0 commit 7f983e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ RUN pip install bleach && \
350350
pip install allennlp && \
351351
# https://b.corp.google.com/issues/184685619#comment9: 3.9.0 is causing a major performance degradation with spacy 2.3.5
352352
pip install importlib-metadata==3.4.0 && \
353-
python -m spacy download en && python -m spacy download en_core_web_lg && \
353+
python -m spacy download en_core_web_sm && python -m spacy download en_core_web_lg && \
354354
apt-get install -y ffmpeg && \
355355
/tmp/clean-layer.sh
356356

tests/test_spacy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
class TestSpacy(unittest.TestCase):
66
def test_model(self):
7-
nlp = spacy.load('en')
7+
nlp = spacy.load('en_core_web_sm')
88
doc = nlp('This is a sentence.')
99
self.assertEqual(5, len(doc))

0 commit comments

Comments
 (0)