textcat.batch-train throws AttributeError in 1.5.1

After upgrading to 1.5.1, when trying to run textcat.batch-train I get an AttributeError:

AttributeError: 'spacy.vectors.Vectors' object has no attribute 'name'

Steps to reproduce:

  $ pip install prodigy-1.5.1-cp35.cp36-cp35m.cp36m-linux_x86_64.whl
  $ curl https://prodi.gy/assets/data/github.jsonl > examples.jsonl
  $ pgy dataset github
  $ pgy db-in github examples.jsonl
  $ pgy stats -l

✨  Prodigy stats

Version            1.5.1
Location           [...]/lib/python3.6/site-packages/prodigy
Prodigy Home       /home/user/.prodigy
Platform           Linux-4.16.11-1-ARCH-x86_64-with-arch
Python Version     3.6.5
Database Name      SQLite
Database Id        sqlite
Total Datasets     1
Total Sessions     1


✨  Datasets

github



  $ pgy textcat.batch-train github

Loaded blank model
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
File "[...]/lib/python3.6/site-packages/prodigy/__main__.py", line 259, in <module>
    controller = recipe(*args, use_plac=True)
File "cython_src/prodigy/core.pyx", line 167, in prodigy.core.recipe.recipe_decorator.recipe_proxy
File "[...]/python3.6/site-packages/plac_core.py", line 328, in call
    cmd, result = parser.consume(arglist)
File "[...]/lib/python3.6/site-packages/plac_core.py", line 207, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "[...]/lib/python3.6/site-packages/prodigy/recipes/textcat.py", line 109, in batch_train
    low_data=len(examples) < 1000)
File "cython_src/prodigy/models/textcat.pyx", line 85, in prodigy.models.textcat.TextClassifier.__init__
File "cython_src/prodigy/models/textcat.pyx", line 59, in prodigy.models.textcat.add_text_classifier
AttributeError: 'spacy.vectors.Vectors' object has no attribute 'name'

Same example on 1.4.2:

$ rm ~/.prodigy/prodigy.db
$ pip install prodigy-wheels/prodigy-1.4.2-cp35.cp36-cp35m.cp36m-linux_x86_64.whl
$ pgy stats -l

✨  Prodigy stats

Version            1.4.2
...

$ pgy dataset github

✨  Successfully added 'github' to database SQLite.

$ pgy db-in github examples.jsonl

✨  Imported 830 annotations for 'github' to database SQLite
Added 'accept' answer to 0 annotations
Session ID: 2018-06-16_16-36-13

$ pgy textcat.batch-train github

Loaded blank model
Using 50% of examples (415) for evaluation
Using 100% of remaining examples (415) for training
Dropout: 0.2  Batch size: 10  Iterations: 10

#          LOSS       F-SCORE    ACCURACY
01         11.781     0.161      0.679
...

Nevermind, I was on Spacy 2.0.10.

Works fine on 2.0.11.

1 Like