Title: Mypy crashes when I import PyTorch 1.7.1 · Issue #9941 · python/mypy · GitHub
Open Graph Title: Mypy crashes when I import PyTorch 1.7.1 · Issue #9941 · python/mypy
X Title: Mypy crashes when I import PyTorch 1.7.1 · Issue #9941 · python/mypy
Description: Crash Report Mypy crashes when I run it on a file that imports PyTorch 1.7.1 within a folder. Traceback ... LOG: Writing torch.distributed.distributed_c10d /Users/tyler.yep/.pyenv/versions/3.9.0/lib/python3.9/site-packages/torch/distribu...
Open Graph Description: Crash Report Mypy crashes when I run it on a file that imports PyTorch 1.7.1 within a folder. Traceback ... LOG: Writing torch.distributed.distributed_c10d /Users/tyler.yep/.pyenv/versions/3.9.0/li...
X Description: Crash Report Mypy crashes when I run it on a file that imports PyTorch 1.7.1 within a folder. Traceback ... LOG: Writing torch.distributed.distributed_c10d /Users/tyler.yep/.pyenv/versions/3.9.0/li...
Opengraph URL: https://github.com/python/mypy/issues/9941
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mypy crashes when I import PyTorch 1.7.1","articleBody":"**Crash Report**\r\n\r\nMypy crashes when I run it on a file that imports PyTorch 1.7.1 within a folder.\r\n\r\n\r\n**Traceback**\r\n\r\n```\r\n...\r\nLOG: Writing torch.distributed.distributed_c10d /Users/tyler.yep/.pyenv/versions/3.9.0/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py torch/distributed/distributed_c10d.meta.json torch/distributed/distributed_c10d.data.json\r\nLOG: Cached module torch.distributed.distributed_c10d has same interface\r\nLOG: Writing torch.distributed /Users/tyler.yep/.pyenv/versions/3.9.0/lib/python3.9/site-packages/torch/distributed/__init__.py torch/distributed/__init__.meta.json torch/distributed/__init__.data.json\r\nLOG: Build finished in 94.339 seconds with 741 modules, and 1 errors\r\n\r\nTraceback (most recent call last):\r\n File \"/Users/tyler.yep/.pyenv/versions/3.9.0/bin/mypy\", line 8, in \u003cmodule>\r\n sys.exit(console_entry())\r\n File \"/Users/tyler.yep/.pyenv/versions/3.9.0/lib/python3.9/site-packages/mypy/__main__.py\", line 11, in console_entry\r\n main(None, sys.stdout, sys.stderr)\r\n File \"mypy/main.py\", line 90, in main\r\n File \"mypy/build.py\", line 180, in build\r\n File \"mypy/build.py\", line 254, in _build\r\n File \"mypy/build.py\", line 2638, in dispatch\r\n File \"mypy/build.py\", line 2964, in process_graph\r\n File \"mypy/build.py\", line 3081, in process_stale_scc\r\n File \"mypy/build.py\", line 2252, in write_cache\r\n File \"mypy/build.py\", line 1462, in write_cache\r\n File \"mypy/nodes.py\", line 313, in serialize\r\n File \"mypy/nodes.py\", line 3140, in serialize\r\n File \"mypy/nodes.py\", line 3076, in serialize\r\nAssertionError\r\n```\r\n\r\n**To Reproduce**\r\nPlace a file with the following contents in a folder:\r\n```\r\nimport torch\r\n```\r\nRun `mypy .` from outside of that folder. (same directory as the setup.cfg)\r\n\r\n**Your Environment**\r\n\r\n\u003c!-- Include as many relevant details about the environment you experienced the bug in -->\r\n\r\n- Mypy version used: 0.800\r\n- Mypy command-line flags: `mypy .`\r\n- Mypy configuration options from `setup.cfg`:\r\n\r\n``` \r\n[mypy]\r\nstrict = True\r\nignore_missing_imports = True\r\n```\r\n\r\n- Python version used: 3.9.0\r\n- Operating system and version: Mac OS X\r\n","author":{"url":"https://github.com/TylerYep","@type":"Person","name":"TylerYep"},"datePublished":"2021-01-22T18:45:37Z","url":"https://github.com/python/mypy/issues/9941"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:75256721-4fd2-183f-ad5e-24ef9e50e8cb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3F6:12476C:1A45F50:22923E8:6B002284 |
| html-safe-nonce | b63e0f2129e388803b2a375c65fa870c31305093ef241c887c84235b805d26a1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0Y2OjEyNDc2QzoxQTQ1RjUwOjIyOTIzRTg6NkIwMDIyODQiLCJ2aXNpdG9yX2lkIjoiNzE1MjkxMDcwMDU5NDA3ODM0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3e9352057e9bd617300101d8147416a4ba6cbc2672945c97f42badb374f04c8a |
| hovercard-subject-tag | issue:792227065 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/9941/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fc38c643643f421409685a250cd4da549fc89a17c910fecafb01ac3374cf1d31/python/mypy/issues/9941 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fc38c643643f421409685a250cd4da549fc89a17c910fecafb01ac3374cf1d31/python/mypy/issues/9941 |
| og:image:alt | Crash Report Mypy crashes when I run it on a file that imports PyTorch 1.7.1 within a folder. Traceback ... LOG: Writing torch.distributed.distributed_c10d /Users/tyler.yep/.pyenv/versions/3.9.0/li... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TylerYep |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width