Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserWarning: Model uses an under-constrained spaCy version requirement #41

Open
stickykeys99 opened this issue Aug 3, 2024 · 2 comments

Comments

@stickykeys99
Copy link
Contributor

When loading any of the models, we get the traceback:

UserWarning: [W094] Model 'tl_calamancy_trf' (0.1.0) specifies an under-constrained spaCy version requirement: >=3.5.0. This can lead to compatibility problems with older versions, or as new spaCy versions are released, because the model may say it's compatible when it's not. Consider changing the "spacy_version" in your meta.json to a version range, with a lower and upper pin. For example: >=3.7.5,<3.8.0
  warnings.warn(warn_msg)

I don't understand, I thought I updated the meta.json files of the models on HuggingFace, and it is indeed reflected, however on the local package files of the model the meta.json file still shows the old version. I uninstalled and reinstalled the model and still get the same warning.

@ljvmiranda921
Copy link
Owner

Without access to your env it's hard to determine what the problem is. Are you using a virtual env? What happens when you run spacy info? I'm planning to release newer models at the end of the year with more constrained versions so I think it's safe to ignore these warnings for now.

@stickykeys99
Copy link
Contributor Author

Hi, I receive the traceback in my local python install, and also in a separate miniconda environment. The environment is freshly created on python 3.11.9 with only calamanCy and its dependencies installed. Note that functionalities work just fine it is simply just that UserWarning notice.

This is what spacy info gives

(my_path_name)\site-packages\spacy\util.py:918: UserWarning: [W094] Model 'tl_calamancy_lg' (0.1.0) specifies an under-constrained spaCy version requirement: >=3.5.0. This can lead to compatibility problems with older versions, or as new spaCy versions are released, because the model may say it's compatible when it's not. Consider changing the "spacy_version" in your meta.json to a version range, with a lower and upper pin. For example: >=3.7.5,<3.8.0
  warnings.warn(warn_msg)
(my_path_name)\site-packages\spacy\util.py:918: UserWarning: [W094] Model 'tl_calamancy_md' (0.1.0) specifies an under-constrained spaCy version requirement: >=3.5.0. This can lead to compatibility problems with older versions, or as new spaCy versions are released, because the model may say it's compatible when it's not. Consider changing the "spacy_version" in your meta.json to a version range, with a lower and upper pin. For example: >=3.7.5,<3.8.0
  warnings.warn(warn_msg)
(my_path_name)\site-packages\spacy\util.py:918: UserWarning: [W094] Model 'tl_calamancy_trf' (0.1.0) specifies an under-constrained spaCy version requirement: >=3.5.0. This can lead to compatibility problems with older versions, or as new spaCy versions are released, because the model may say it's compatible when it's not. Consider changing the "spacy_version" in your meta.json to a version range, with a lower and upper pin. For example: >=3.7.5,<3.8.0
  warnings.warn(warn_msg)

============================== Info about spaCy ==============================

spaCy version    3.7.5
Location         (my_path_name)\site-packages\spacy
Platform         Windows-10-10.0.22631-SP0
Python version   3.11.5
Pipelines        en_core_web_sm (3.7.1), en_core_web_trf (3.7.3), tl_calamancy_lg (0.1.0), tl_calamancy_md (0.1.0), tl_calamancy_trf (0.1.0)

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants