TypeError when I evaluate my NER model
See original GitHub issueEvaluation Command
!python -m rasa_nlu.test \
--data export_data_format_train.json \
--model model/ner_model \
--mode evaluation
Config_file
pipeline:
- name: “SpacyNLP”
- name: “tokenizer_spacy”
- name: “ner_crf”
- name: “ner_synonyms”
- name: “CRFEntityExtractor”
Error
/home/user/anaconda2/envs/jd_matcher/lib/python3.6/runpy.py:125: RuntimeWarning: 'rasa_nlu.test' found in sys.modules after import of package 'rasa_nlu', but prior to execution of 'rasa_nlu.test'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
2019-04-30 11:55:12 INFO rasa_nlu.components - Added 'SpacyNLP' to component cache. Key 'SpacyNLP-en'.
2019-04-30 11:55:12 INFO rasa_nlu.training_data.loading - Training data format of export_data_format_train.json is rasa_nlu
2019-04-30 11:55:12 INFO rasa_nlu.training_data.training_data - Training data stats:
- intent examples: 0 (0 distinct intents)
- Found intents:
- entity examples: 3 (9 distinct entities)
- found entities: 'soft_skills', 'technical_skills', 'degree', 'salary', 'job_position', 'degree_major', 'job_location', 'overall_work_experience', 'technology_work_experience'
Traceback (most recent call last):
File "/home/user/anaconda2/envs/jd_matcher/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/user/anaconda2/envs/jd_matcher/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/user/anaconda2/envs/jd_matcher/lib/python3.6/site-packages/rasa_nlu/test.py", line 1001, in <module>
main()
File "/home/user/anaconda2/envs/jd_matcher/lib/python3.6/site-packages/rasa_nlu/test.py", line 995, in main
cmdline_args.histogram)
File "/home/user/anaconda2/envs/jd_matcher/lib/python3.6/site-packages/rasa_nlu/test.py", line 744, in run_evaluation
intent_targets = [None] * test_data.training_examples
TypeError: can't multiply sequence by non-int of type 'list'
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to evaluate trained spaCy version 3 model?
Where test.spacy is your test data. Also, about this error: TypeError: [E978] The Tokenizer.score method takes a list of Example objects, ...
Read more >What to do when you get an error - Hugging Face Course
In this section we'll look at some common errors that can occur when you're trying to generate predictions from your freshly tuned Transformer...
Read more >Saving a trained NER model as a loadable module - spacy
This error likely means that your model's meta.json includes an unknown pipeline component, and spaCy fails to resolve the string name (e.g. ' ......
Read more >Language Processing Pipelines · spaCy Usage Documentation
spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more....
Read more >A better way to evaluate Named Entity Recognition (NER ...
You are left guessing whether the model is suffering due to long sentence length, or is it because there are too many (or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry @Nomiluks, I should have mentioned – awesome that you have it fixed locally. I’ve implemented the change and it’ll be released in rasa_nlu 0.15.1, so whenever that comes out, don’t be afraid of updating and losing your local fix 🙂
Hi @Nomiluks , what happened to your entity examples? Earlier you had this:
Now it says there are no entity examples. I think that has something to do with the problem.