Title: torch.nn missing from torch module and `from torch import` completions · Issue #1301 · microsoft/python-language-server · GitHub
Open Graph Title: torch.nn missing from torch module and `from torch import` completions · Issue #1301 · microsoft/python-language-server
X Title: torch.nn missing from torch module and `from torch import` completions · Issue #1301 · microsoft/python-language-server
Description: Hi, I'm the author of type stubs for PyTorch, and it seems VSCode is not suggesting some autocompletes of methods and modules that the stubs clearly state exist and that mypy and PyCharm make use of (using the 'daily' download channel). ...
Open Graph Description: Hi, I'm the author of type stubs for PyTorch, and it seems VSCode is not suggesting some autocompletes of methods and modules that the stubs clearly state exist and that mypy and PyCharm make use o...
X Description: Hi, I'm the author of type stubs for PyTorch, and it seems VSCode is not suggesting some autocompletes of methods and modules that the stubs clearly state exist and that mypy and PyCharm make u...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/1301
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"torch.nn missing from torch module and `from torch import` completions","articleBody":"Hi,\r\nI'm the author of type stubs for PyTorch, and it seems VSCode is not suggesting some autocompletes of methods and modules that the stubs clearly state exist and that mypy and PyCharm make use of (using the 'daily' download channel). I haven't been able to construct a MWE yet.\r\n\r\nTo reproduce, install PyTorch master (as of 046c4589df15fc4e7b832d594d3d8e3a54cd47c9) following the instructions at https://github.com/pytorch/pytorch#get-the-pytorch-source. *NOT* the release version, which doesn't yet ship with the type stubs the language server seems to be having trouble using.\r\n\r\nIn a buffer, after waiting for the analysis to complete, try\r\n\r\n```python\r\nimport torch\r\ntorch.\r\n```\r\n\r\nthe list of autocompletes does not include the `nn` module, even though `from . import nn as nn` appears in `torch/__init__.pyi`.\r\n\r\nFurther,\r\n\r\n```python\r\nfrom torch import nn\r\nnn.\r\n```\r\n\r\ndoesn't provide any suggestions from the language server, even though `torch/nn/__init__.pyi` contains\r\n\r\n```python\r\nfrom .modules import * \r\nfrom .parameter import Parameter as Parameter\r\nfrom .parallel import DataParallel as DataParallel\r\nfrom . import init as init\r\nfrom . import utils as utils\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/malmaud","@type":"Person","name":"malmaud"},"datePublished":"2019-07-09T21:04:32Z","url":"https://github.com/microsoft/python-language-server/issues/1301"}
| 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:9b64f4a3-b266-6374-a879-dc60ab87d74d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DABA:2AB414:4A072A:62158A:6AFE6685 |
| html-safe-nonce | 27489927dd185dcc37f73d63ddcd389837f177fc7fc3a214f977492fb89e5ab0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUJBOjJBQjQxNDo0QTA3MkE6NjIxNThBOjZBRkU2Njg1IiwidmlzaXRvcl9pZCI6IjgwNDg2MTUwMTA1MDQ0MzUzMzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 220e24fd4a0f1c57ee85d35f3a9a3eb178e3a0c4df8fb33db0a97cc8fa4a0a89 |
| hovercard-subject-tag | issue:465984189 |
| 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/microsoft/python-language-server/1301/issue_layout |
| twitter:image | https://opengraph.githubassets.com/923ca6224b46cbfe80acf03702fcfc9d40e6e59e5dda04e2af7ee20f59972587/microsoft/python-language-server/issues/1301 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/923ca6224b46cbfe80acf03702fcfc9d40e6e59e5dda04e2af7ee20f59972587/microsoft/python-language-server/issues/1301 |
| og:image:alt | Hi, I'm the author of type stubs for PyTorch, and it seems VSCode is not suggesting some autocompletes of methods and modules that the stubs clearly state exist and that mypy and PyCharm make use o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | malmaud |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 145901977 |
| octolytics-dimension-repository_nwo | microsoft/python-language-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145901977 |
| octolytics-dimension-repository_network_root_nwo | microsoft/python-language-server |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width