Skip to content

Commit 2e50627

Browse files
ArjunR2404facebook-github-bot
authored andcommitted
Starter Task 2: Adding return type annotation to the _attribute_progress_setup method (#1576)
Summary: The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function. Reviewed By: sarahtranfb Differential Revision: D75972827
1 parent a94663f commit 2e50627

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

captum/attr/_core/feature_ablation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,15 +1102,14 @@ def _fut_tuple_to_accumulate_fut_list_cross_tensor(
11021102
"_fut_tuple_to_accumulate_fut_list_cross_tensor failed"
11031103
) from e
11041104

1105-
# pyre-fixme[3] return type must be annotated
11061105
def _attribute_progress_setup(
11071106
self,
11081107
formatted_inputs: Tuple[Tensor, ...],
11091108
feature_mask: Tuple[Tensor, ...],
11101109
enable_cross_tensor_attribution: bool,
11111110
perturbations_per_eval: int,
11121111
**kwargs: Any,
1113-
):
1112+
) -> tqdm:
11141113
feature_counts = self._get_feature_counts(
11151114
formatted_inputs, feature_mask, **kwargs
11161115
)

0 commit comments

Comments
 (0)