Commit f8762d6
Fix unit test listing (#1574)
Summary:
Pull Request resolved: #1574
On a clean, stable fbcode checkout, running `buck test fbcode//pytorch/captum/tests/utils:test_progress` yields `NO TESTS RAN` consistently.
Looking at the TestX dashboard, some Captum tests had not been run since 5/22, which coincides with D75113906, e.g. [pytorch/captum/tests/utils:test_progress - test_nested_simple_progress](https://www.internalfb.com/intern/test/562950126652826?ref_report_id=0):
https://www.internalfb.com/intern/px/p/7nGLJ
My hypothesis is that the current `BaseTest` assignment in init confuses unit test listing/discovery, however not all the Captum unit tests that extend `BaseTest` are impacted... frankly not sure why. However the repro on the affected tests are consistent
Some example tests that are not affected: test_feature_permutation, test_common
Affected examples: test_linear_model, test_jacobian, test_infidelity
Running from fbcode stable, ~1500 tests run:
```
[sarahtran@8176.od /data/sandcastle/boxes/fbsource (e78e7566fd)]$ buck test fbcode//pytorch/captum/tests/...
File changed: fbcode//pytorch/captum/captum/testing/helpers/__init__.py
⃠ Omitted: pytorch/captum/tests/influence/fb/examples/simple:captum.influence.simple_example - main
Test has been omitted from this run because of the reason: Fails label filtering because: Negative filters present: slow
No missing positive labels.
Buck UI: https://www.internalfb.com/buck2/110b3a2a-43f5-4960-9025-108d1a854baf
Test UI: https://www.internalfb.com/intern/testinfra/testrun/15199648830072998
Network: Up: 728KiB Down: 621KiB (reSessionID-5fea945a-5dc6-43ad-b7f0-cd3d53656a22)
Executing actions. Remaining 0/243
Command: test. Finished 127 cache (100% hit)
Time elapsed: 4:02.8s
Tests finished: Pass 1561. Fail 0. Fatal 0. Skip 1. Build failure 0
```
Reviewed By: jjuncho
Differential Revision: D75927248
fbshipit-source-id: aa95489178fadcb809f4d5884b4cbaedb31090811 parent 7dac7f4 commit f8762d6
File tree
2 files changed
+6
-4
lines changed- captum/testing
- attr/helpers
- helpers
2 files changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
0 commit comments