Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sequence feature explain error #3397

Merged
merged 3 commits into from
May 15, 2023
Merged

Conversation

jeffkinnison
Copy link
Contributor

@jeffkinnison jeffkinnison commented May 13, 2023

Sequence feature explanations always fail with the error

RuntimeError: One of the differentiated Tensors appears to not have been used in the graph. Set allow_unused=True if this is the desired behavior.

This happens because sequence features are not treated as embedded features, which leads to the wrong encoder layer being passed into captum's LayerIntegratedGradients. This fix updates explanations to treat sequences as embedded features and adds explanation integration tests for all sequence encoders.

Copy link
Collaborator

@justinxzhao justinxzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet!

@github-actions
Copy link

Unit Test Results

  6 files  ±0    6 suites  ±0   1h 20m 4s ⏱️ + 4m 20s
33 tests ±0  29 ✔️ ±0    4 💤 ±0  0 ±0 
99 runs  ±0  87 ✔️ ±0  12 💤 ±0  0 ±0 

Results for commit 6bbb01b. ± Comparison against base commit e2cde3a.

@jeffkinnison jeffkinnison merged commit d39f0e0 into master May 15, 2023
15 checks passed
@jeffkinnison jeffkinnison deleted the sequence-explain-error branch May 15, 2023 16:26
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.

None yet

2 participants