Skip to content

Commit 1bd99c1

Browse files
Vivek Miglanifacebook-github-bot
authored andcommitted
Fix neuron conductance pyre fixme issues (#1602)
Summary: Pull Request resolved: #1602 Fixing unresolved pyre fixme issues in corresponding file Reviewed By: styusuf Differential Revision: D76737548 fbshipit-source-id: 7714f842596bb257217e1821b6c25363a4bc0bb0
1 parent 30830b7 commit 1bd99c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

captum/attr/_core/neuron/neuron_conductance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# pyre-strict
44
import warnings
5-
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
5+
from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union
66

77
import torch
88
from captum._utils.common import (
@@ -328,9 +328,9 @@ def attribute(
328328
attribute_to_neuron_input=attribute_to_neuron_input,
329329
grad_kwargs=grad_kwargs,
330330
)
331-
# pyre-fixme[7]: Expected `TensorOrTupleOfTensorsGeneric` but got
332-
# `Tuple[Tensor, ...]`.
333-
return _format_output(is_inputs_tuple, attrs)
331+
return cast(
332+
TensorOrTupleOfTensorsGeneric, _format_output(is_inputs_tuple, attrs)
333+
)
334334

335335
def _attribute(
336336
self,

0 commit comments

Comments
 (0)