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

getting error while loading the model #215

Open
luqmanjamilch opened this issue Dec 11, 2023 · 5 comments
Open

getting error while loading the model #215

luqmanjamilch opened this issue Dec 11, 2023 · 5 comments

Comments

@luqmanjamilch
Copy link

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'
@lizgzil
Copy link
Collaborator

lizgzil commented Dec 12, 2023

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.

@lizgzil
Copy link
Collaborator

lizgzil commented Dec 12, 2023

also - @luqmanjamilch do you have the AWS cli downloaded?

@luqmanjamilch
Copy link
Author

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.

@lizgzil
Copy link
Collaborator

lizgzil commented Dec 12, 2023

@luqmanjamilch that's great! thanks for letting us know. We will hopefully release the new version soon!

@Scavascava
Copy link

Hey @lizgzil, when are you planning to release the new version?

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

3 participants