Port NumPy typing testing style to PyTorch#54234
Port NumPy typing testing style to PyTorch#54234guilhermeleobas wants to merge 9 commits intopytorch:masterfrom guilhermeleobas:test_typing
Conversation
💊 CI failures summary and remediationsAs of commit d1cacd6 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
|
Hi @rgommers, can you do an initial review? I'll add more examples to the |
Codecov Report
@@ Coverage Diff @@
## master #54234 +/- ##
==========================================
+ Coverage 77.38% 77.44% +0.05%
==========================================
Files 1896 1893 -3
Lines 186911 186081 -830
==========================================
- Hits 144646 144111 -535
+ Misses 42265 41970 -295 |
rgommers
left a comment
There was a problem hiding this comment.
Thanks @guilhermeleobas, overall this looks good. A number of small things to fix. Would also be good to merge with master to get a fresh CI run.
|
|
||
|
|
||
| def _strip_filename(msg: str) -> str: | ||
| """Strip the filename from a mypy message.""" |
|
Hi Ralf, thanks for the review! I've addressed all your comments |
rgommers
left a comment
There was a problem hiding this comment.
Thanks @guilhermeleobas, this LGTM now.
|
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: This is a follow-up PR of pytorch#52408 and includes the `pass/` and `fail/` directories. Pull Request resolved: pytorch#54234 Reviewed By: walterddr Differential Revision: D27681410 Pulled By: malfet fbshipit-source-id: e6817df77c758f4c1295ea62613106c71cfd3fc3
`test_typing.py` was written to use `pytest` in #54234 which unfortunately rendered it incompatible with run_test.py, and therefore it was not running in CI all this time. In this PR, same functionality is re-written using unittest framework, and `parametrize` from `torch.testing._internal._common_utils`. Disable `fail/bitwise_ops.py` as it regressed at some point as well as one of examples in `namedtuple.py` as `torch.linalg.qr` type is no longer revealed correctly. [ghstack-poisoned]
`test_typing.py` was written to use `pytest` in #54234 which unfortunately rendered it incompatible with run_test.py, and therefore it was not running in CI all this time. In this PR, same functionality is re-written using unittest framework, and `parametrize` from `torch.testing._internal._common_utils`. Disable `fail/bitwise_ops.py` as it regressed at some point as well as one of examples in `namedtuple.py` as `torch.linalg.qr` type is no longer revealed correctly. [ghstack-poisoned]
`test_typing.py` was written to use `pytest` in #54234 which unfortunately rendered it incompatible with run_test.py, and therefore it was not running in CI all this time. In this PR, same functionality is re-written using unittest framework, and `parametrize` from `torch.testing._internal._common_utils`. Disable `fail/bitwise_ops.py` as it regressed at some point as well as one of examples in `namedtuple.py` as `torch.linalg.qr` type is no longer revealed correctly. [ghstack-poisoned]
`test_typing.py` was written to use `pytest` in #54234 which unfortunately rendered it incompatible with run_test.py, and therefore it was not running in CI all this time. In this PR, same functionality is re-written using unittest framework, and `parametrize` from `torch.testing._internal._common_utils`. Valid `test_typing.py` with ufmt Disable `fail/bitwise_ops.py` and `pass/jit.py` as it regressed at some point as well as one of examples in `namedtuple.py` as `torch.linalg.qr` type is no longer revealed correctly. [ghstack-poisoned]
`test_typing.py` was written to use `pytest` in #54234 which unfortunately rendered it incompatible with run_test.py, and therefore it was not running in CI all this time. In this PR, same functionality is re-written using unittest framework, and `parametrize` from `torch.testing._internal._common_utils`. Valid `test_typing.py` with ufmt Disable `fail/bitwise_ops.py` and `pass/jit.py` as it regressed at some point as well as one of examples in `namedtuple.py` as `torch.linalg.qr` type is no longer revealed correctly. [ghstack-poisoned]
`test_typing.py` was written to use `pytest` in #54234 which unfortunately rendered it incompatible with run_test.py, and therefore it was not running in CI all this time. In this PR, same functionality is re-written using unittest framework, and `parametrize` from `torch.testing._internal._common_utils`. Valid `test_typing.py` with ufmt Disable `fail/bitwise_ops.py` and `pass/jit.py` as it regressed at some point as well as one of examples in `namedtuple.py` as `torch.linalg.qr` type is no longer revealed correctly. Pull Request resolved: #111428 Approved by: https://github.com/clee2000
Summary: This is a follow-up PR of pytorch#52408 and includes the `pass/` and `fail/` directories. Pull Request resolved: pytorch#54234 Reviewed By: walterddr Differential Revision: D27681410 Pulled By: malfet fbshipit-source-id: e6817df77c758f4c1295ea62613106c71cfd3fc3
This is a follow-up PR of #52408 and includes the
pass/andfail/directories.