Skip to content

Commit

Permalink
Disable pyre errors for metrics/_core (#1433)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1433

A Pyre upgrade added a few more typing failures.

Reviewed By: jjuncho

Differential Revision: D65606038

fbshipit-source-id: 43090271017bafd8e1e8f4ea28d2a1b2333493db
  • Loading branch information
cyrjano authored and facebook-github-bot committed Nov 8, 2024
1 parent 7a12f69 commit d241b2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions captum/metrics/_core/infidelity.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ def _generate_perturbations(
repeated instances per example.
"""

# pyre-fixme[53]: Captured variable `baselines_expanded` is not annotated.
# pyre-fixme[53]: Captured variable `inputs_expanded` is not annotated.
def call_perturb_func() -> (
Tuple[TensorOrTupleOfTensorsGeneric, TensorOrTupleOfTensorsGeneric]
):
Expand Down
2 changes: 2 additions & 0 deletions captum/metrics/_core/sensitivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ def max_values(input_tnsr: Tensor) -> Tensor:
# pyre-fixme[33]: Given annotation cannot be `Any`.
kwargs_copy: Any = None

# pyre-fixme[53]: Captured variable `bsz` is not annotated.
# pyre-fixme[53]: Captured variable `expl_inputs` is not annotated.
def _next_sensitivity_max(current_n_perturb_samples: int) -> Tensor:
inputs_perturbed = _generate_perturbations(current_n_perturb_samples)

Expand Down

0 comments on commit d241b2a

Please sign in to comment.