Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fall 2021] Step 1: Pyre - Fix type checking errors in Pytorch torch/fx/experimental/fx2trt/example/fx2trt_example.py #65

Open
0xedward opened this issue Sep 27, 2021 · 0 comments
Labels
Fall 2021 Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021 pyre step 1 Level 1 project for MLH Fall 2021

Comments

@0xedward
Copy link
Collaborator

0xedward commented Sep 27, 2021

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/fx/experimental/fx2trt/example/fx2trt_example.py:

torch/fx/experimental/fx2trt/example/fx2trt_example.py:75:8 Incompatible variable type [9]: settings is declared to have type `net_min_base._MinimizerSettingBase` but is used as type `None`.
torch/fx/experimental/fx2trt/example/fx2trt_example.py:116:8 Incompatible variable type [9]: operator_support is declared to have type `op_support.OperatorSupport` but is used as type `None`.
torch/fx/experimental/fx2trt/example/fx2trt_example.py:117:8 Incompatible variable type [9]: settings is declared to have type `splitter_base._SplitterSettingBase` but is used as type `None`.

Submitting a PR

We use the following linters internally, so to save everyone's time, please make sure you run the following linters locally and fix errors related to the files you modified before submitting a PR:

black && usort format . && flake8

To install the linters, you can run the following command:

pip install flake8 usort black==21.4b2
@0xedward 0xedward added Fall 2021 Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021 pyre step 1 Level 1 project for MLH Fall 2021 labels Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fall 2021 Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021 pyre step 1 Level 1 project for MLH Fall 2021
Projects
None yet
Development

No branches or pull requests

1 participant