mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Fix type checking errors in fx/utils.py (#66311)
Summary: - [x] Fix the Pyre type checking errors in `torch/quantization/fx/utils.py` ``` torch/quantization/fx/utils.py:490:4 Incompatible variable type [9]: target_module_type is declared to have type `Type[nn.modules.module.Module]` but is used as type `None`. ``` Fixes the issue: [MLH-Fellowship/pyre-check/issues/75](https://github.com/MLH-Fellowship/pyre-check/issues/75) Pull Request resolved: https://github.com/pytorch/pytorch/pull/66311 Reviewed By: pradeep90 Differential Revision: D31506399 Pulled By: 0xedward fbshipit-source-id: 3d866fba6005452378d4a2613b8689fa2d7a8b67
This commit is contained in:
parent
e5f6f356da
commit
85b562dd2b
|
|
@ -490,7 +490,7 @@ def is_get_tensor_info_node(node: Node) -> bool:
|
|||
def maybe_get_next_module(
|
||||
node: Node,
|
||||
modules: Dict[str, nn.Module],
|
||||
target_module_type: Type[nn.Module] = None,
|
||||
target_module_type: Optional[Type[nn.Module]] = None,
|
||||
target_functional_type: Any = None,
|
||||
) -> Optional[Node]:
|
||||
""" Gets the next module that matches what is needed in
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user