Closed clechristophe closed 2 years ago
Hi @clechristophe,
Thank you, and thanks for using the package.
I think the fix here might be an easy one. This PR https://github.com/cdpierse/transformers-interpret/pull/27 introduced some breaking changes that no longer allow the text to be explained to be passed in the explainer constructor, instead, the class instance returned is callable, and you use that to generate explanations. So now instead of what you did, you would define it as:
cls_explainer = SequenceClassificationExplainer(model, tokenizer)
cls_explainer("I like you, I love you")
Let me know if this works.
Thanks, Charles
Hi @cdpierse
Thank you for your quick response !
It works perfectly, I didn't see the updated documentation on the readme...
Clément
Hi @cdpierse , your project looks very nice, congrats !
I have a problem with the SequenceClassificationExplainer() that is not working with any classification model in input (including the DistilBertForSequenceClassification you used in your towardsdatascience article). I have the following error:
I suspect that it might be a version problem with HuggingFace transformers lib. I'm currently using transformers 4.16.2 and transformers-interpret 0.6.0.
Thanks for your help