Skip to content

[Fall 2021] Step 1: Pyre - Fix type checking errors in Pytorch torch/quantization/fx/quantization_patterns.py #74

@0xedward

Description

@0xedward

This task is part of a bigger effort to migrate Pytorch from Mypy to Pyre. The goal of this task for you is to gain comfort with the Python type system and the types of errors Pyre gives. Future Pysa project work and debugging builds on this foundation.

Development Environment Setup

Task Description

Fix the Pyre type checking errors in torch/quantization/fx/quantization_patterns.py:

torch/quantization/fx/quantization_patterns.py:167:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:307:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:434:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:495:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:664:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:881:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:920:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:975:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:1058:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:1190:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:1261:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:1327:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:1358:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:1443:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.
torch/quantization/fx/quantization_patterns.py:1458:16 Incompatible variable type [9]: convert_custom_config_dict is declared to have type `Dict[str, typing.Any]` but is used as type `None`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fall 2021Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021pyrestep 1Level 1 project for MLH Fall 2021

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions