-
Notifications
You must be signed in to change notification settings - Fork 547
Move methods out of FeatureAblation and make them free methods. #1663
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
cyrjano
added a commit
to cyrjano/captum
that referenced
this pull request
Nov 12, 2025
…-pytorch#1663) Summary: This diff moves methods out of the `FeatureAblation` class and makes them free methods. The changes include creating a new method `_parse_forward_out` to force forward output type assertion and conversion, and modifying the `add_one_back` module to use the new methods. The `attr/fb/add_one_back.py` file has been modified to use the new methods. The `attr/fb/within_group_utils.py` file has also been modified to use the new methods. The `attr/fb/test_within_group_utils.py` file has been Differential Revision: D86785624
cyrjano
added a commit
to cyrjano/captum
that referenced
this pull request
Nov 12, 2025
…-pytorch#1663) Summary: This diff moves methods out of the `FeatureAblation` class and makes them free methods. The changes include creating a new method `_parse_forward_out` to force forward output type assertion and conversion, and modifying the `add_one_back` module to use the new methods. The `attr/fb/add_one_back.py` file has been modified to use the new methods. The `attr/fb/within_group_utils.py` file has also been modified to use the new methods. The `attr/fb/test_within_group_utils.py` file has been Differential Revision: D86785624
cyrjano
added a commit
to cyrjano/captum
that referenced
this pull request
Nov 12, 2025
…-pytorch#1663) Summary: This diff moves methods out of the `FeatureAblation` class and makes them free methods. The changes include creating a new method `_parse_forward_out` to force forward output type assertion and conversion, and modifying the `add_one_back` module to use the new methods. The `attr/fb/add_one_back.py` file has been modified to use the new methods. The `attr/fb/within_group_utils.py` file has also been modified to use the new methods. The `attr/fb/test_within_group_utils.py` file has been Differential Revision: D86785624
6126f07 to
92bcb51
Compare
cyrjano
added a commit
to cyrjano/captum
that referenced
this pull request
Nov 12, 2025
…-pytorch#1663) Summary: This diff moves methods out of the `FeatureAblation` class and makes them free methods. The changes include creating a new method `_parse_forward_out` to force forward output type assertion and conversion, and modifying the `add_one_back` module to use the new methods. The `attr/fb/add_one_back.py` file has been modified to use the new methods. The `attr/fb/within_group_utils.py` file has also been modified to use the new methods. The `attr/fb/test_within_group_utils.py` file has been Differential Revision: D86785624
cyrjano
added a commit
to cyrjano/captum
that referenced
this pull request
Nov 12, 2025
…-pytorch#1663) Summary: This diff moves methods out of the `FeatureAblation` class and makes them free methods. The changes include creating a new method `_parse_forward_out` to force forward output type assertion and conversion, and modifying the `add_one_back` module to use the new methods. The `attr/fb/add_one_back.py` file has been modified to use the new methods. The `attr/fb/within_group_utils.py` file has also been modified to use the new methods. The `attr/fb/test_within_group_utils.py` file has been Differential Revision: D86785624
92bcb51 to
8b188a2
Compare
cyrjano
added a commit
to cyrjano/captum
that referenced
this pull request
Nov 12, 2025
…-pytorch#1663) Summary: This diff moves methods out of the `FeatureAblation` class and makes them free methods. The changes include creating a new method `_parse_forward_out` to force forward output type assertion and conversion, and modifying the `add_one_back` module to use the new methods. The `attr/fb/add_one_back.py` file has been modified to use the new methods. The `attr/fb/within_group_utils.py` file has also been modified to use the new methods. The `attr/fb/test_within_group_utils.py` file has been Differential Revision: D86785624
…eta-pytorch#1662) Summary: Improve documentation of the _format method and cleanup a few typing errors. Reviewed By: styusuf Differential Revision: D86432880
…-pytorch#1663) Summary: This diff moves methods out of the `FeatureAblation` class and makes them free methods. The changes include creating a new method `_parse_forward_out` to force forward output type assertion and conversion, and modifying the `add_one_back` module to use the new methods. The `attr/fb/add_one_back.py` file has been modified to use the new methods. The `attr/fb/within_group_utils.py` file has also been modified to use the new methods. The `attr/fb/test_within_group_utils.py` file has been Differential Revision: D86785624
8b188a2 to
8b8ae73
Compare
cyrjano
added a commit
to cyrjano/captum
that referenced
this pull request
Nov 12, 2025
…-pytorch#1663) Summary: This diff moves methods out of the `FeatureAblation` class and makes them free methods. The changes include creating a new method `_parse_forward_out` to force forward output type assertion and conversion, and modifying the `add_one_back` module to use the new methods. The `attr/fb/add_one_back.py` file has been modified to use the new methods. The `attr/fb/within_group_utils.py` file has also been modified to use the new methods. The `attr/fb/test_within_group_utils.py` file has been Differential Revision: D86785624
cyrjano
added a commit
to cyrjano/captum
that referenced
this pull request
Nov 13, 2025
…-pytorch#1663) Summary: This diff moves methods out of the `FeatureAblation` class and makes them free methods. The changes include creating a new method `_parse_forward_out` to force forward output type assertion and conversion, and modifying the `add_one_back` module to use the new methods. The `attr/fb/add_one_back.py` file has been modified to use the new methods. The `attr/fb/within_group_utils.py` file has also been modified to use the new methods. The `attr/fb/test_within_group_utils.py` file has been Reviewed By: jjuncho Differential Revision: D86785624
Contributor
|
This pull request has been merged in 9f48afb. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary: This diff moves methods out of the
FeatureAblationclass and makes them free methods. The changes include creating a new method_parse_forward_outto force forward output type assertion and conversion, and modifying theadd_one_backmodule to use the new methods. Theattr/fb/add_one_back.pyfile has been modified to use the new methods. Theattr/fb/within_group_utils.pyfile has also been modified to use the new methods. Theattr/fb/test_within_group_utils.pyfile has beenDifferential Revision: D86785624