Closed pabvald closed 2 years ago
Hi @cdpierse.
Here's my implementation of the NER explainer. I have included the possibility of specifying a list of indexes and/or labels to ignore, like you wanted.
I look forward to your review.
Best regards
Hi @pabvald,
Thanks so much for putting this PR together. I've wanted to add this support for quite a while so you doing the whole thing is massively appreciated. I've only had a quick glance at the PR but so far it looks great. I'll have some more specific feedback later in the week but thanks again, really looking forward to merging this in.
All the best, Charles
@pabvald this is looking very good so far, I'm really impressed so great job. Only a few small suggestions for this PR the main one being around keeping the result of word_attributions
on par with the data displayed in visualize
but it's very close to being ready to merge. Thank you so much for all of this work, you've done a huge piece of work!
@cdpierse Thanks for review!
I have implemented the changes you have suggested. Looking forward to another review.
Hi @pabvald,
Haven't forgotten about this PR, hoping to get time this weekend to do a final review ☺️
@pabvald this is looking great, it's pretty much ready to merge, the only other change I would suggest is using an even smaller model for testing, I would go with elastic/distilbert-base-cased-finetuned-conll03-english
as it's about half the size of the one you are currently using and will help prevent against flakey tests. I will merge this in and prepare a release after that 😄
@cdpierse done! Now elastic/distilbert-base-cased-finetuned-conll03-english
is used for testing. 🧪
Amazing work @pabvald, thanks so much for this PR, very happy to have such a great contribution. I've just merged in and will get the next release ready!
PR Description
Support for NER models (i.e. token classification) included in the
explainers/token_classification_explainer.py
file, with the possibility of indicating which indexes and which labels should be ignored, as was suggested by @cdpierse. The notebooknotebooks/ner_example.ipynb
covers its usage in detail. The corresponding section has been added to the documentationMotivation and Context
References issue: #86 References discussion: #83
Tests and Coverage
Tests included in
test/test_token_classification.py
. Coverage of90%
.Types of changes
Final Checklist: