From 5d4c95f4444536881d832a90f7060b496b84cb22 Mon Sep 17 00:00:00 2001 From: Vivek Miglani Date: Thu, 17 Oct 2024 23:17:49 -0700 Subject: [PATCH 1/2] Adjust hessian_reg to fix Arnoldi test case (#1388) Summary: Increase hessian regularization term for Arnoldi test to ensure that highest self-influence datapoint / proponent match the corresponding example Differential Revision: D64584502 --- tests/influence/_core/test_tracin_regression.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/influence/_core/test_tracin_regression.py b/tests/influence/_core/test_tracin_regression.py index 9609091698..90708d4b8d 100644 --- a/tests/influence/_core/test_tracin_regression.py +++ b/tests/influence/_core/test_tracin_regression.py @@ -376,6 +376,7 @@ def _test_tracin_identity_regression_setup( DataInfluenceConstructor( ArnoldiInfluenceFunction, arnoldi_tol=1e-8, # needs to be small to avoid empty arnoldi basis + hessian_reg=2e-3, ), ), ], From 7cba42376eed1898b6d7f06a0ca91216f752ec44 Mon Sep 17 00:00:00 2001 From: Vivek Miglani Date: Thu, 17 Oct 2024 23:17:49 -0700 Subject: [PATCH 2/2] Update config to allow running mypy on Captum in fbcode (#1386) Summary: Running mypy directly on Captum within fbcode results in errors due to fb only directories, which doesn't match the behavior of mypy in OSS. Add appropriate excludes to setup.cfg to enable direct usage of mypy in fbcode Reviewed By: craymichael Differential Revision: D64576023 --- setup.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.cfg b/setup.cfg index ebaf825352..0856b359e6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,3 +11,9 @@ exclude = omit = test/* setup.py + +[mypy] +exclude = ^.*fb.*$ + +[mypy-captum.log.fb.*] +ignore_errors = True