Skip to content

Commit d68b8f1

Browse files
sarahtranfbmeta-codesync[bot]
authored andcommitted
Clean up redundant tests (#1797)
Summary: Pull Request resolved: #1797 Independent tensor mask IDs are no longer supported in `FeatureAblation`/`FeaturePermutation`. Reviewed By: cyrjano Differential Revision: D96150478 fbshipit-source-id: 30e815ab2eb8573a92f8ea27d16efe653fca5b85
1 parent fd12a88 commit d68b8f1

File tree

1 file changed

+0
-82
lines changed

1 file changed

+0
-82
lines changed

captum/testing/attr/helpers/test_config.py

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,6 @@
112112
"model": BasicModel_MultiLayer(),
113113
"attribute_args": {"inputs": torch.randn(4, 3), "target": 1},
114114
},
115-
{
116-
"name": "basic_single_target_cross_tensor_attributions",
117-
"algorithms": [
118-
FeatureAblation,
119-
FeaturePermutation,
120-
],
121-
"model": BasicModel_MultiLayer(),
122-
"attribute_args": {
123-
"inputs": torch.randn(4, 3),
124-
"target": 1,
125-
"enable_cross_tensor_attribution": True,
126-
},
127-
},
128115
{
129116
"name": "basic_multi_input",
130117
"algorithms": [
@@ -192,21 +179,6 @@
192179
},
193180
"dp_delta": 0.0005,
194181
},
195-
{
196-
"name": "basic_multi_input_multi_target_cross_tensor_attributions",
197-
"algorithms": [
198-
FeatureAblation,
199-
FeaturePermutation,
200-
],
201-
"model": BasicModel_MultiLayer_MultiInput(),
202-
"attribute_args": {
203-
"inputs": (10 * torch.randn(6, 3), 5 * torch.randn(6, 3)),
204-
"additional_forward_args": (2 * torch.randn(6, 3), 5),
205-
"target": [0, 1, 1, 0, 0, 1],
206-
"enable_cross_tensor_attribution": True,
207-
},
208-
"dp_delta": 0.0005,
209-
},
210182
{
211183
"name": "basic_multiple_tuple_target",
212184
"algorithms": [
@@ -230,20 +202,6 @@
230202
"additional_forward_args": (None, True),
231203
},
232204
},
233-
{
234-
"name": "basic_multiple_tuple_target_cross_tensor_attributions",
235-
"algorithms": [
236-
FeatureAblation,
237-
FeaturePermutation,
238-
],
239-
"model": BasicModel_MultiLayer(),
240-
"attribute_args": {
241-
"inputs": torch.randn(4, 3),
242-
"target": [(1, 0, 0), (0, 1, 1), (1, 1, 1), (0, 0, 0)],
243-
"additional_forward_args": (None, True),
244-
"enable_cross_tensor_attribution": True,
245-
},
246-
},
247205
{
248206
"name": "basic_tensor_single_target",
249207
"algorithms": [
@@ -285,19 +243,6 @@
285243
"target": torch.tensor([1, 1, 0, 0]),
286244
},
287245
},
288-
{
289-
"name": "basic_tensor_multi_target_cross_tensor_attributions",
290-
"algorithms": [
291-
FeatureAblation,
292-
FeaturePermutation,
293-
],
294-
"model": BasicModel_MultiLayer(),
295-
"attribute_args": {
296-
"inputs": torch.randn(4, 3),
297-
"target": torch.tensor([1, 1, 0, 0]),
298-
"enable_cross_tensor_attribution": True,
299-
},
300-
},
301246
# Primary Configs with Baselines
302247
{
303248
"name": "basic_multiple_tuple_target_with_baselines",
@@ -317,20 +262,6 @@
317262
"additional_forward_args": (None, True),
318263
},
319264
},
320-
{
321-
"name": "basic_multiple_tuple_target_with_baselines_cross_tensor_attributions",
322-
"algorithms": [
323-
FeatureAblation,
324-
],
325-
"model": BasicModel_MultiLayer(),
326-
"attribute_args": {
327-
"inputs": torch.randn(4, 3),
328-
"baselines": 0.5 * torch.randn(4, 3),
329-
"target": [(1, 0, 0), (0, 1, 1), (1, 1, 1), (0, 0, 0)],
330-
"additional_forward_args": (None, True),
331-
"enable_cross_tensor_attribution": True,
332-
},
333-
},
334265
{
335266
"name": "basic_tensor_single_target_with_baselines",
336267
"algorithms": [
@@ -348,19 +279,6 @@
348279
"target": torch.tensor([0]),
349280
},
350281
},
351-
{
352-
"name": "basic_tensor_single_target_with_baselines_cross_tensor_attributions",
353-
"algorithms": [
354-
FeatureAblation,
355-
],
356-
"model": BasicModel_MultiLayer(),
357-
"attribute_args": {
358-
"inputs": torch.randn(4, 3),
359-
"baselines": 0.5 * torch.randn(4, 3),
360-
"target": torch.tensor([0]),
361-
"enable_cross_tensor_attribution": True,
362-
},
363-
},
364282
# Primary Configs with Internal Batching
365283
{
366284
"name": "basic_multiple_tuple_target_with_internal_batching",

0 commit comments

Comments
 (0)