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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy tests hang after importing PyTorch Lightning #8341

Closed
EricWiener opened this issue Jul 8, 2021 · 3 comments
Closed

mypy tests hang after importing PyTorch Lightning #8341

EricWiener opened this issue Jul 8, 2021 · 3 comments
Labels
bug Something isn't working help wanted Open to be worked on priority: 1 Medium priority task won't fix This will not be worked on

Comments

@EricWiener
Copy link
Contributor

馃悰 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

@EricWiener EricWiener added bug Something isn't working help wanted Open to be worked on labels Jul 8, 2021
@MelvinYin
Copy link

mypy version: 0.770 and 0.910

@awaelchli awaelchli added the priority: 1 Medium priority task label Jul 16, 2021
@stale
Copy link

stale bot commented Aug 15, 2021

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!

@stale stale bot added the won't fix This will not be worked on label Aug 15, 2021
@stale stale bot closed this as completed Aug 22, 2021
@hauntsaninja
Copy link

This will be fixed by python/mypy#11632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to be worked on priority: 1 Medium priority task won't fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants