Closed
Description
🐛 Bug
My tests hang/take much longer to run when I import from pytorch lightning. After letting it run for a very long time I get the error:
main(__file__, sys.stdout, sys.stderr, args = args)
File "mypy/main.py", line 89, in main
File "mypy/build.py", line 180, in build
File "mypy/build.py", line 249, in _build
File "mypy/build.py", line 2649, in dispatch
File "mypy/build.py", line 2956, in process_graph
File "mypy/build.py", line 3074, in process_stale_scc
File "mypy/build.py", line 2266, in write_cache
File "mypy/build.py", line 1441, in write_cache
File "mypy/nodes.py", line 302, in serialize
File "mypy/nodes.py", line 3097, in serialize
File "mypy/nodes.py", line 3033, in serialize
AssertionError
Please reproduce using the BoringModel
Will work on this.
To Reproduce
Import pytorch_lightning and then try to run mypy tests.
Expected behavior
mypy tests don't hang
Environment
- PyTorch Lightning Version: 1.3.7post0. Also reproduced on 1.3.8, 1.3.0, 1.18, 0.10.0
- PyTorch Version: 1.9.0+cu111
- Python version: 3.9
- OS (e.g., Linux): Linux
- CUDA/cuDNN version: 11.2
- GPU models and configuration: RTX 2081i
- How you installed PyTorch (
conda
,pip
, source): pip - If compiling from source, the output of
torch.__config__.show()
: - Any other relevant information:
Additional context
This is very similar to the issue python/mypy#8481