From 6e479afe13a0097aafadb8c3fb3dfbe4b46f2f9c Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Thu, 6 May 2021 19:08:21 +0000 Subject: [PATCH] Fix spacy test. spacy has been upgraded to 3.x (fastai had a 2.x requirement but now support 3.x which upgraded spacy.) --- Dockerfile | 2 +- tests/test_spacy.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6bd15db6..066e6494 100644 --- a/Dockerfile +++ b/Dockerfile @@ -350,7 +350,7 @@ RUN pip install bleach && \ pip install allennlp && \ # https://b.corp.google.com/issues/184685619#comment9: 3.9.0 is causing a major performance degradation with spacy 2.3.5 pip install importlib-metadata==3.4.0 && \ - python -m spacy download en && python -m spacy download en_core_web_lg && \ + python -m spacy download en_core_web_sm && python -m spacy download en_core_web_lg && \ apt-get install -y ffmpeg && \ /tmp/clean-layer.sh diff --git a/tests/test_spacy.py b/tests/test_spacy.py index bd58cc30..22a44c15 100644 --- a/tests/test_spacy.py +++ b/tests/test_spacy.py @@ -4,6 +4,6 @@ class TestSpacy(unittest.TestCase): def test_model(self): - nlp = spacy.load('en') + nlp = spacy.load('en_core_web_sm') doc = nlp('This is a sentence.') self.assertEqual(5, len(doc))