pytorch / captum

Model interpretability and understanding for PyTorch
https://captum.ai
BSD 3-Clause "New" or "Revised" License
4.95k stars 499 forks source link

Separate out future logic from attribute method into attribute_future in Feature Ablation #1320

Closed jjuncho closed 3 months ago

jjuncho commented 3 months ago

Summary: This diff separates the logic for futures in the FeatureAblation class into its own method, attribute_future. This method should only be used with forward functions that return a future, and additional test cases were added to ensure the proper usage of the attribute and the attribute_future methods.

the construct_future_forward helper method was also moved into the utils class to share with other method tests

Differential Revision: D60911353

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D60911353

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D60911353

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D60911353

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D60911353

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D60911353

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D60911353

facebook-github-bot commented 3 months ago

This pull request has been merged in pytorch/captum@5ffd68ab69ea1bb134a312046689d72e2622934d.