Skip to content

Conversation

@Peer222
Copy link

@Peer222 Peer222 commented Dec 18, 2024

PR Description

Fixes a bug for the MultiLabelClassificationExplainer class.

Parameters passed to MultiLabelClassificationExplainer.call() are not taken into account internally (internal_batch_size, n_steps) or are passed wrongly to explainer() call (embedding_type at position of class_name).

Motivation and Context

Removing the internally created explainer (explainer = SequenceClassificationExplainer(...)) and replacing it with a super().call(...) did not work because self.attributions is then overwritten and accessing self.word_attributions fails.

Tests and Coverage

Tests still succeed. (The tests specified for the additional parameters did not catch the bug)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Docs (Added to or improved Transformers Interpret's documentation)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Final Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

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

Successfully merging this pull request may close these issues.

1 participant