Skip to content

Commit

Permalink
Move helper functions for influence tests to be under helpers directo…
Browse files Browse the repository at this point in the history
…ry (#1260)

Summary:
Pull Request resolved: #1260

As titled.

This changes helps keeping the tests to be an exact mapped of the implementations.
A future follow up could be a consolidation of helpers. (there could be some helpers universal for both attribution and influence)

Reviewed By: cyrjano

Differential Revision: D55270852

fbshipit-source-id: 68f06af70b2e8438282842176e4bba74c2442ffb
  • Loading branch information
cicichen01 authored and facebook-github-bot committed Mar 25, 2024
1 parent 724e9a1 commit c6e9c22
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 11 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/influence/_core/test_arnoldi_influence.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from parameterized import parameterized
from tests.helpers import BaseTest
from tests.helpers.basic import assertTensorAlmostEqual
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
_format_batch_into_tuple,
build_test_name_func,
DataInfluenceConstructor,
Expand Down
2 changes: 1 addition & 1 deletion tests/influence/_core/test_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from parameterized import parameterized
from tests.helpers import BaseTest
from tests.helpers.basic import assertTensorAlmostEqual
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
_format_batch_into_tuple,
build_test_name_func,
DataInfluenceConstructor,
Expand Down
2 changes: 1 addition & 1 deletion tests/influence/_core/test_naive_influence.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from parameterized import parameterized
from tests.helpers import BaseTest
from tests.helpers.basic import assertTensorAlmostEqual, assertTensorTuplesAlmostEqual
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
_format_batch_into_tuple,
build_test_name_func,
DataInfluenceConstructor,
Expand Down
2 changes: 1 addition & 1 deletion tests/influence/_core/test_tracin_aggregate_influence.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from captum.influence._core.tracincp import TracInCP
from parameterized import parameterized
from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
build_test_name_func,
DataInfluenceConstructor,
get_random_model_and_data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from parameterized import parameterized
from tests.helpers import BaseTest
from tests.helpers.basic import assertTensorAlmostEqual
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
_format_batch_into_tuple,
build_test_name_func,
DataInfluenceConstructor,
Expand Down
2 changes: 1 addition & 1 deletion tests/influence/_core/test_tracin_k_most_influential.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from parameterized import parameterized
from tests.helpers import BaseTest
from tests.helpers.basic import assertTensorAlmostEqual
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
_format_batch_into_tuple,
build_test_name_func,
DataInfluenceConstructor,
Expand Down
2 changes: 1 addition & 1 deletion tests/influence/_core/test_tracin_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from parameterized import parameterized
from tests.helpers import BaseTest
from tests.helpers.basic import assertTensorAlmostEqual
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
_isSorted,
_wrap_model_in_dataparallel,
build_test_name_func,
Expand Down
2 changes: 1 addition & 1 deletion tests/influence/_core/test_tracin_self_influence.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from parameterized import parameterized
from tests.helpers import BaseTest
from tests.helpers.basic import assertTensorAlmostEqual
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
_format_batch_into_tuple,
build_test_name_func,
DataInfluenceConstructor,
Expand Down
2 changes: 1 addition & 1 deletion tests/influence/_core/test_tracin_show_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from captum.influence._core.tracincp_fast_rand_proj import TracInCPFast
from parameterized import parameterized
from tests.helpers import BaseTest
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
build_test_name_func,
DataInfluenceConstructor,
get_random_model_and_data,
Expand Down
2 changes: 1 addition & 1 deletion tests/influence/_core/test_tracin_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from parameterized import parameterized
from tests.helpers import BaseTest
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
build_test_name_func,
DataInfluenceConstructor,
get_random_model_and_data,
Expand Down
2 changes: 1 addition & 1 deletion tests/influence/_core/test_tracin_xor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from parameterized import parameterized
from tests.helpers import BaseTest
from tests.helpers.basic import assertTensorAlmostEqual
from tests.influence._utils.common import (
from tests.helpers.influence.common import (
_wrap_model_in_dataparallel,
BasicLinearNet,
BinaryDataset,
Expand Down

0 comments on commit c6e9c22

Please sign in to comment.