Skip to content

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Feb 2, 2021

Older versions are incompatible with python-3.9

Older version are incompatible with python-3.9
@malfet malfet requested a review from a team February 2, 2021 00:58
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Feb 2, 2021

💊 CI failures summary and remediations

As of commit 1194156 (more details on the Dr. CI page):


  • 5/5 failures introduced in this PR

🕵️ 5 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_bionic_py3_6_clang9_test (1/5)

Step: "Enable SSH" (full log | diagnosis details | 🔁 rerun)

Feb 02 02:24:32 AssertionError: mypy failed: torch/include/fp16/avx2.py:1: error: Cannot find implementation or library stub for module named 'peachpy' [import]
Feb 02 02:23:42 Test results will be stored in test-reports/python-unittest
Feb 02 02:23:43   test_doc_examples (__main__.TestTypeHints) ... ok (0.746s)
Feb 02 02:24:32   test_run_mypy (__main__.TestTypeHints) ... FAIL (48.928s)
Feb 02 02:24:32 
Feb 02 02:24:32 ======================================================================
Feb 02 02:24:32 FAIL [48.928s]: test_run_mypy (__main__.TestTypeHints) [mypy.ini]
Feb 02 02:24:32 ----------------------------------------------------------------------
Feb 02 02:24:32 Traceback (most recent call last):
Feb 02 02:24:32   File "test_type_hints.py", line 171, in test_run_mypy
Feb 02 02:24:32     self.fail(f"mypy failed: {stdout} {stderr}")
Feb 02 02:24:32 AssertionError: mypy failed: torch/include/fp16/avx2.py:1: error: Cannot find implementation or library stub for module named 'peachpy'  [import]
Feb 02 02:24:32 torch/include/fp16/avx2.py:2: error: Cannot find implementation or library stub for module named 'peachpy.x86_64'  [import]
Feb 02 02:24:32 torch/include/fp16/avx2.py:6: error: Name 'YMMRegister' is not defined  [name-defined]
Feb 02 02:24:32 torch/include/fp16/avx2.py:7: error: Name 'VPERMQ' is not defined  [name-defined]
Feb 02 02:24:32 torch/include/fp16/avx2.py:9: error: Name 'YMMRegister' is not defined  [name-defined]
Feb 02 02:24:32 torch/include/fp16/avx2.py:10: error: Name 'VPXOR' is not defined  [name-defined]
Feb 02 02:24:32 torch/include/fp16/avx2.py:12: error: Name 'YMMRegister' is not defined  [name-defined]
Feb 02 02:24:32 torch/include/fp16/avx2.py:13: error: Name 'VPUNPCKLWD' is not defined  [name-defined]
Feb 02 02:24:32 torch/include/fp16/avx2.py:15: error: Name 'YMMRegister' is not defined  [name-defined]
Feb 02 02:24:32 torch/include/fp16/avx2.py:16: error: Name 'VPADDW' is not defined  [name-defined]
Feb 02 02:24:32 torch/include/fp16/avx2.py:18: error: Name 'YMMRegister' is not defined  [name-defined]

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_test (2/5)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Feb 02 02:24:44 AssertionError: mypy failed: caffe2/__init__.py: error: Duplicate module named 'caffe2' (also at 'torch/lib/python3.6/site-packages/caffe2/__init__.py')
Feb 02 02:24:18 ----------------------------------------------------------------------
Feb 02 02:24:27   test_doc_examples (__main__.TestTypeHints) ... ok (9.484s)
Feb 02 02:24:44   test_run_mypy (__main__.TestTypeHints) ... FAIL (16.625s)
Feb 02 02:24:44 
Feb 02 02:24:44 ======================================================================
Feb 02 02:24:44 FAIL [16.625s]: test_run_mypy (__main__.TestTypeHints) [mypy.ini]
Feb 02 02:24:44 ----------------------------------------------------------------------
Feb 02 02:24:44 Traceback (most recent call last):
Feb 02 02:24:44   File "test_type_hints.py", line 171, in test_run_mypy
Feb 02 02:24:44     self.fail(f"mypy failed: {stdout} {stderr}")
Feb 02 02:24:44 AssertionError: mypy failed: caffe2/__init__.py: error: Duplicate module named 'caffe2' (also at 'torch/lib/python3.6/site-packages/caffe2/__init__.py')
Feb 02 02:24:44 caffe2/__init__.py: error: Are you missing an __init__.py?  [misc]
Feb 02 02:24:44 Found 2 errors in 1 file (errors prevented further checking)
Feb 02 02:24:44  
Feb 02 02:24:44 
Feb 02 02:24:44 ----------------------------------------------------------------------
Feb 02 02:24:44 Ran 2 tests in 26.110s
Feb 02 02:24:44 
Feb 02 02:24:44 FAILED (failures=1)
Feb 02 02:24:44 
Feb 02 02:24:44 Generating XML reports...

See CircleCI build pytorch_linux_xenial_cuda10_2_cudnn7_py3_gcc7_test1 (3/5)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Feb 02 02:28:06 AssertionError: mypy failed: torch/csrc/deploy/interpreter/cpython/lib/python3.8/collections/__init__.py:96: error: invalid syntax [syntax]
Feb 02 02:27:46 Test results will be stored in test-reports/python-unittest
Feb 02 02:27:55   test_doc_examples (__main__.TestTypeHints) ... ok (8.955s)
Feb 02 02:28:06   test_run_mypy (__main__.TestTypeHints) ... FAIL (11.458s)
Feb 02 02:28:06 
Feb 02 02:28:06 ======================================================================
Feb 02 02:28:06 FAIL [11.458s]: test_run_mypy (__main__.TestTypeHints) [mypy.ini]
Feb 02 02:28:06 ----------------------------------------------------------------------
Feb 02 02:28:06 Traceback (most recent call last):
Feb 02 02:28:06   File "test_type_hints.py", line 171, in test_run_mypy
Feb 02 02:28:06     self.fail(f"mypy failed: {stdout} {stderr}")
Feb 02 02:28:06 AssertionError: mypy failed: torch/csrc/deploy/interpreter/cpython/lib/python3.8/collections/__init__.py:96: error: invalid syntax  [syntax]
Feb 02 02:28:06 Found 1 error in 1 file (errors prevented further checking)
Feb 02 02:28:06  
Feb 02 02:28:06 
Feb 02 02:28:06 ----------------------------------------------------------------------
Feb 02 02:28:06 Ran 2 tests in 20.414s
Feb 02 02:28:06 
Feb 02 02:28:06 FAILED (failures=1)
Feb 02 02:28:06 
Feb 02 02:28:06 Generating XML reports...
Feb 02 02:28:06 Generated XML report: test-reports/python-unittest/TEST-TestTypeHints-20210202022746.xml

See CircleCI build pytorch_linux_xenial_py3_clang5_asan_test1 (4/5)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Feb 02 02:00:59 AssertionError: mypy failed: caffe2/__init__.py: error: Duplicate module named 'caffe2' (also at 'torch/lib/python3.6/site-packages/caffe2/__init__.py')
Feb 02 02:00:27 Test results will be stored in test-reports/python-unittest
Feb 02 02:00:39   test_doc_examples (__main__.TestTypeHints) ... ok (11.247s)
Feb 02 02:00:59   test_run_mypy (__main__.TestTypeHints) ... FAIL (20.066s)
Feb 02 02:00:59 
Feb 02 02:00:59 ======================================================================
Feb 02 02:00:59 FAIL [20.066s]: test_run_mypy (__main__.TestTypeHints) [mypy.ini]
Feb 02 02:00:59 ----------------------------------------------------------------------
Feb 02 02:00:59 Traceback (most recent call last):
Feb 02 02:00:59   File "test_type_hints.py", line 171, in test_run_mypy
Feb 02 02:00:59     self.fail(f"mypy failed: {stdout} {stderr}")
Feb 02 02:00:59 AssertionError: mypy failed: caffe2/__init__.py: error: Duplicate module named 'caffe2' (also at 'torch/lib/python3.6/site-packages/caffe2/__init__.py')
Feb 02 02:00:59 caffe2/__init__.py: error: Are you missing an __init__.py?  [misc]
Feb 02 02:00:59 Found 2 errors in 1 file (errors prevented further checking)
Feb 02 02:00:59  
Feb 02 02:00:59 
Feb 02 02:00:59 ----------------------------------------------------------------------
Feb 02 02:00:59 Ran 2 tests in 31.313s
Feb 02 02:00:59 
Feb 02 02:00:59 FAILED (failures=1)
Feb 02 02:00:59 
Feb 02 02:00:59 Generating XML reports...

See CircleCI build pytorch_linux_bionic_py3_8_gcc9_coverage_test1 (5/5)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Feb 02 02:16:33 AssertionError: mypy failed: caffe2/__init__.py: error: Duplicate module named 'caffe2' (also at 'torch/lib/python3.8/site-packages/caffe2/__init__.py')
Feb 02 02:16:14   test_run_mypy (__main__.TestTypeHints)
Feb 02 02:16:33 Runs mypy over all files specified in our mypy configs ... FAIL (18.317s)
Feb 02 02:16:33 
Feb 02 02:16:33 ======================================================================
Feb 02 02:16:33 FAIL [18.317s]: test_run_mypy (__main__.TestTypeHints) [mypy.ini]
Feb 02 02:16:33 Runs mypy over all files specified in our mypy configs
Feb 02 02:16:33 ----------------------------------------------------------------------
Feb 02 02:16:33 Traceback (most recent call last):
Feb 02 02:16:33   File "test_type_hints.py", line 171, in test_run_mypy
Feb 02 02:16:33     self.fail(f"mypy failed: {stdout} {stderr}")
Feb 02 02:16:33 AssertionError: mypy failed: caffe2/__init__.py: error: Duplicate module named 'caffe2' (also at 'torch/lib/python3.8/site-packages/caffe2/__init__.py')
Feb 02 02:16:33 caffe2/__init__.py: error: Are you missing an __init__.py?  [misc]
Feb 02 02:16:33 Found 2 errors in 1 file (errors prevented further checking)
Feb 02 02:16:33  
Feb 02 02:16:33 
Feb 02 02:16:33 ----------------------------------------------------------------------
Feb 02 02:16:33 Ran 2 tests in 28.943s
Feb 02 02:16:33 
Feb 02 02:16:33 FAILED (failures=1)
Feb 02 02:16:33 
Feb 02 02:16:33 Generating XML reports...

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.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@samestep
Copy link
Contributor

samestep commented Feb 2, 2021

Interesting that this is causing three different error messages across the five failing test jobs:

I'm also curious why mypy-strict.ini isn't showing up in any of those jobs, and why the two other mypy tests are showing up twice each (with different times) in pytorch_linux_bionic_py3_6_clang9_test.

facebook-github-bot pushed a commit that referenced this pull request Feb 8, 2021
Summary:
This PR adds a local [`mypy` plugin](https://mypy.readthedocs.io/en/stable/extending_mypy.html#extending-mypy-using-plugins) that warns if you accidentally run `mypy` using a version that doesn't match [the version we install for CI](https://github.com/pytorch/pytorch/blob/6045663f391e9bebac31e006a98c1dd381792936/.circleci/docker/common/install_conda.sh#L117), since this trips people up sometimes when `mypy` gives errors in some versions (see #51513) but not others.

Pull Request resolved: #51799

Test Plan:
To check that this doesn't break our `mypy` test(s) when you have the correct version installed:
```
python test/test_type_hints.py
```
To check that this does indeed warn when you have an incorrect `mypy` version installed, switch to a different version (e.g. 0.782), and run the above command or either of these:
```
mypy
mypy --config-file=mypy-strict.ini
```
You should get the following message on stderr:
```
You are using mypy version 0.782, which is not supported
in the PyTorch repo. Please switch to mypy version 0.770.

For example, if you installed mypy via pip, run this:

    pip install mypy==0.770

Or if you installed mypy via conda, run this:

    conda install -c conda-forge mypy=0.770
```

Reviewed By: janeyx99

Differential Revision: D26282010

Pulled By: samestep

fbshipit-source-id: 7b423020d0529700dea8972b27afa2d7068e1b12
xsacha pushed a commit to xsacha/pytorch that referenced this pull request Mar 31, 2021
Summary:
This PR adds a local [`mypy` plugin](https://mypy.readthedocs.io/en/stable/extending_mypy.html#extending-mypy-using-plugins) that warns if you accidentally run `mypy` using a version that doesn't match [the version we install for CI](https://github.com/pytorch/pytorch/blob/6045663f391e9bebac31e006a98c1dd381792936/.circleci/docker/common/install_conda.sh#L117), since this trips people up sometimes when `mypy` gives errors in some versions (see pytorch#51513) but not others.

Pull Request resolved: pytorch#51799

Test Plan:
To check that this doesn't break our `mypy` test(s) when you have the correct version installed:
```
python test/test_type_hints.py
```
To check that this does indeed warn when you have an incorrect `mypy` version installed, switch to a different version (e.g. 0.782), and run the above command or either of these:
```
mypy
mypy --config-file=mypy-strict.ini
```
You should get the following message on stderr:
```
You are using mypy version 0.782, which is not supported
in the PyTorch repo. Please switch to mypy version 0.770.

For example, if you installed mypy via pip, run this:

    pip install mypy==0.770

Or if you installed mypy via conda, run this:

    conda install -c conda-forge mypy=0.770
```

Reviewed By: janeyx99

Differential Revision: D26282010

Pulled By: samestep

fbshipit-source-id: 7b423020d0529700dea8972b27afa2d7068e1b12
@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2021

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
Stale pull requests will automatically be closed 30 days after being marked Stale

@github-actions github-actions bot added the Stale label Apr 3, 2021
@malfet malfet closed this Apr 10, 2021
@malfet malfet deleted the malfet/update-mypy-to-0.800 branch April 10, 2021 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants