question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning about incompatible spaCy models.

See original GitHub issue

I get the following error when trying to load en_core_sci_sm:

UserWarning: [W031] Model 'en_core_sci_sm' (0.2.4) requires spaCy v2.2 and is incompatible with the current spaCy version (2.3.0). This may lead to unexpected results or runtime errors. To resolve this, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate
  warnings.warn(warn_msg)

Steps to reproduce: Create clean Conda environment and activate

conda create --name scispacy python=3.8
conda activate scispacy

Install scispacy and install the latest en_core_sci_sm model.

pip install scispacy
pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.2.4/en_core_sci_sm-0.2.4.tar.gz

Attempt import

(scispacy) $ python -c "import spacy; nlp=spacy.load('en_core_sci_sm')"
/home/davidw/miniconda3/envs/scispacy/lib/python3.8/site-packages/spacy/util.py:271: UserWarning: [W031] Model 'en_core_sci_sm' (0.2.4) requires spaCy v2.2 and is incompatible with the current spaCy version (2.3.0). This may lead to unexpected results or runtime errors. To resolve this, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate
  warnings.warn(warn_msg)

Is this warning important or can I ignore it?

Thanks,

Dave

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:11

github_iconTop GitHub Comments

6reactions
dakingggcommented, Jun 30, 2020

I’m going to reopen this because we need to retrain the models for spacy 2.3.0 and other people will hit this, thanks for reporting!

3reactions
snosrapcommented, Jul 2, 2020

I ran into this as well – 1.10 release of Prodigy requires spacy 2.3

Here are some release notes on spacy 2.3 that mention incompatibility with models trained on earlier versions

Read more comments on GitHub >

github_iconTop Results From Across the Web

python 3.x - How to fix spaCy en_model incompatible with ...
UserWarning: [W031] Model 'en_model' (0.0.0) requires spaCy v2.2 and is incompatible with the current spaCy version (2.3.2).
Read more >
What's New in v3.2 · spaCy Usage Documentation
1, you will see a warning telling you that the pipeline may be incompatible. This doesn't necessarily have to be true, but we...
Read more >
Model en_pipeline is incompatible with current version - solved
For more details and available updates, run: python -m spacy validate warnings.warn(warn_msg). I'm annotating with a custom NER model ...
Read more >
spacy - PyPI
Trained pipelines for spaCy can be installed as Python packages. This means that they're a component of your application, just like any other...
Read more >
How to use the spacy.util.ensure_path function in spacy - Snyk
fail("Can't locate model data", input_path, exits=1) if not output_path or not output_path.exists(): msg.fail("Output directory not found", output_path, exits=1) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found