Error when running sense2vec.teach recipe with Spacy 3

Hi,

I'm trying to run the sense2vec.teach recipe as described on the github repo (GitHub - explosion/sense2vec: 🦆 Contextually-keyed word vectors), but get the following error.

> prodigy sense2vec.teach tech_phrases ./s2v_reddit_2015_md.tar.gz --seeds "natural language processing, machine learning, artificial intelligence"

> Traceback (most recent call last):
>   File "/Users/oliver/opt/anaconda3/envs/prodigy/lib/python3.7/runpy.py", line 183, in _run_module_as_main
>     mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
>   File "/Users/oliver/opt/anaconda3/envs/prodigy/lib/python3.7/runpy.py", line 142, in _get_module_details
>     return _get_module_details(pkg_main_name, error)
>   File "/Users/oliver/opt/anaconda3/envs/prodigy/lib/python3.7/runpy.py", line 109, in _get_module_details
>     __import__(pkg_name)
>   File "/Users/oliver/opt/anaconda3/envs/prodigy/lib/python3.7/site-packages/prodigy/__init__.py", line 7, in <module>
>     from . import recipes
>   File "/Users/oliver/opt/anaconda3/envs/prodigy/lib/python3.7/site-packages/prodigy/recipes/__init__.py", line 4, in <module>
>     from ..deprecated import recipes  # noqa
>   File "/Users/oliver/opt/anaconda3/envs/prodigy/lib/python3.7/site-packages/prodigy/deprecated/recipes.py", line 15, in <module>
>     from ..models.matcher import PatternMatcher
>   File "/Users/oliver/opt/anaconda3/envs/prodigy/lib/python3.7/site-packages/prodigy/models/__init__.py", line 1, in <module>
>     from .ner import EntityRecognizer, merge_spans  # noqa: F401
>   File "cython_src/prodigy/models/ner.pyx", line 7, in init prodigy.models.ner
> ModuleNotFoundError: No module named 'spacy.gold'

Is this maybe caused by the renaming of spacy.gold to spacy.train in v3 (as described here: https://spacy.io/usage/v3#migrating-gold)?

Best,
Oli

Hi! It looks like the error here happens in Prodigy, since the latest stable version depends on spaCy v2.x. We just launched Prodigy nightly that updates Prodigy to spaCy v3 – you can sign up to test it here:

This version should also work with the sense2vec recipes out-of-the-box, although I haven't tested it yet. The good news is, none of sense2vec is really affected by the new stuff in v3, so the results will be the same and you could easily run it in a separate virtual environment, collect your terms, annotate your data, export it and then train with spaCy v3 :slightly_smiling_face:

1 Like

It works with Prodigy nightly! Thank you, Oli

how to install pordigy in spacy3?is it free?

Hi @mashagua !

Prodigy is a commercial annotation tool - you can find some of the details on licensing here: https://prodi.gy/buy

Currently, the latest version v1.10 still works with spaCy v2, but we're beta testing Prodigy v1.11 for spaCy v3. This "nightly" version is currently only available for current users of 1.10 though. More information can be found here: ✨ Prodigy nightly: spaCy v3 support, UI for overlapping spans, improved feeds & more