ljvmiranda921 / calamanCy

NLP pipelines for Tagalog using spaCy
MIT License
45 stars 3 forks source link

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

Open stickykeys99 opened 3 months ago

stickykeys99 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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.