getting error while loading the model
Opened this issue · 5 comments
Hi,
It seems that the library is unable to download the trained NER model from S3 and it's giving an error. Is there a way to fix this issue? Thank you
For reference, I share the error below:
2023-12-10 13:50:13,350 - SkillsExtractor - INFO - Loading the model from a local location (ner_spacy.py:507)
2023-12-10 13:50:13,351 - SkillsExtractor - INFO - Loading the model from /usr/local/lib/python3.10/dist-packages/ojd_daps_skills_data/outputs/models/ner_model/20220825/ (ner_spacy.py:510)
2023-12-10 13:50:13,362 - SkillsExtractor - INFO - Model not found locally - you may need to download it from S3 (set s3_download to True) (ner_spacy.py:516)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-07431820480b> in <cell line: 1>()
----> 1 es.load()
1 frames
/usr/local/lib/python3.10/dist-packages/ojd_daps_skills/pipeline/skill_ner/ner_spacy.py in load_model(self, model_folder, s3_download)
517 "Model not found locally - you may need to download it from S3 (set s3_download to True)"
518 )
--> 519 return self.nlp
520
521
AttributeError: 'JobNER' object has no attribute 'nlp'
Hi @luqmanjamilch - thanks for using our library!
Are you using the library with pip install ojd_daps_skills
? If so, we have just pushed some changes to dev which potentially should fix this issue (or at least give you better warnings), but these havent been included in the latest release yet - so you could try pip install git+https://github.com/nestauk/ojd_daps_skills.git@dev
instead.
Let us know how you get on.
also - @luqmanjamilch do you have the AWS cli downloaded?
Hi @lizgzil, Thank you for your help. I used the pip install git+https://github.com/nestauk/ojd_daps_skills.git@dev
to install the package and it's working fine. Besides, I am using it on Google Colaboratory and I did not download or set-up AWS cli.
@luqmanjamilch that's great! thanks for letting us know. We will hopefully release the new version soon!
Hey @lizgzil, when are you planning to release the new version?