diff --git a/tests/attr/test_llm_attr.py b/tests/attr/test_llm_attr.py index 94a3b454c..2b48bc042 100644 --- a/tests/attr/test_llm_attr.py +++ b/tests/attr/test_llm_attr.py @@ -156,7 +156,9 @@ def device(self) -> torch.device: # pyre-fixme[13]: Attribute `device` is never initialized. # pyre-fixme[13]: Attribute `use_cached_outputs` is never initialized. class TestLLMAttr(BaseTest): + # pyre-fixme[13]: Attribute `device` is never initialized. device: str + # pyre-fixme[13]: Attribute `use_cached_outputs` is never initialized. use_cached_outputs: bool # pyre-fixme[56]: Pyre was not able to infer the type of argument `comprehension @@ -377,6 +379,7 @@ def test_futures_not_implemented(self) -> None: ) # pyre-fixme[13]: Attribute `device` is never initialized. class TestLLMGradAttr(BaseTest): + # pyre-fixme[13]: Attribute `device` is never initialized. device: str @parameterized.expand( diff --git a/tests/attr/test_llm_attr_gpu.py b/tests/attr/test_llm_attr_gpu.py index d7ada5918..a6b56adba 100644 --- a/tests/attr/test_llm_attr_gpu.py +++ b/tests/attr/test_llm_attr_gpu.py @@ -149,7 +149,9 @@ def device(self) -> torch._C.device: # pyre-fixme[13]: Attribute `use_cached_outputs` is declared in class `TestLlmAttrGpu` # to have type `bool` but is never initialized. class TestLlmAttrGpu(BaseTest): + # pyre-fixme[13]: Attribute `device` is never initialized. device: str + # pyre-fixme[13]: Attribute `use_cached_outputs` is never initialized. use_cached_outputs: bool @parameterized.expand([(FeatureAblation,), (ShapleyValueSampling,)]) @@ -235,6 +237,7 @@ def test_llm_attr_without_token_gpu( # pyre-fixme[13]: Attribute `device` is declared in class `TestLLMGradAttrGPU` # to have type `str` but is never initialized. class TestLLMGradAttrGPU(BaseTest): + # pyre-fixme[13]: Attribute `device` is never initialized. device: str def test_llm_attr(self) -> None: diff --git a/tests/helpers/basic_models.py b/tests/helpers/basic_models.py index 5d1a1132b..8c4685f75 100644 --- a/tests/helpers/basic_models.py +++ b/tests/helpers/basic_models.py @@ -148,6 +148,7 @@ def __init__(self) -> None: # pyre-fixme[2]: Parameter must be annotated. def forward(self, input1, input2): input = input1 + input2 + # pyre-fixme[6]: For 1st argument expected `Tensor` but got `int`. return 1 - F.relu(1 - input)[:, 1]