Skip to content

Will this work for ZeroShotClassification? #19

@premthomas

Description

@premthomas

Hello Charles,

I used the example from your medium article with one change. On replacing the DistilBert model with the Bart model, I get an error that the attribute does not exist. The model I am trying to use is "facebook/bart-large-mnli".

File "C:\TextClassificationV5\lib\site-packages\transformers_interpret\explainers\sequence_classification.py", line 129, in _calculate_attributions
attribute = getattr(self.model, self.model_type)
File "C:\TextClassificationV5\lib\site-packages\torch\nn\modules\module.py", line 779, in __getattr__
type(self).__name__, name))
torch.nn.modules.module.ModuleAttributeError: 'BartForSequenceClassification' object has no attribute 'bart'"

The model name is BartForSequenceClassification
And the model_type is Bart

Have I missed something?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions