Intellisense doesnt work for all Pytorch methods
See original GitHub issueEnvironment data
- VS Code version: 1.33.1/1.34.0
- Extension version (available under the Extensions sidebar): 2019.4.12954
- OS and version: Windows_NT x64 10.0.17763
- Python version (& distribution if applicable, e.g. Anaconda): 3.6.7 Anaconda3
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Relevant/affected Python packages and their versions: Pytorch 1.0.0 and 1.1.0
Expected behaviour
Intellisense should work on Pytorch methods as well but it does not!
Actual behaviour
It wont work on methods such as mm
, matmul
, mul
, from_numpy
, sum
, randn
, tensor
, exp
, empty
arange
, zeros
, cat
,etc as described here in details.
Steps to reproduce:
- Simply try to use one of the aforementioned torch methods such as
sum
,empty
,randn
,tensor
,etc
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
Starting Jedi Python language engine.
##########Linting Output - pylint##########
************* Module lesson4_1
9,19,error,no-member:Module 'torch' has no 'exp' member
15,11,error,no-member:Module 'torch' has no 'randn' member
16,10,error,no-member:Module 'torch' has no 'randn_like' member
17,7,error,no-member:Module 'torch' has no 'randn' member
20,4,error,no-member:Module 'torch' has no 'sum' member
23,0,error,no-member:Module 'torch' has no 'empty' member
----------------------------------------------------------------------
Your code has been rated at -11.43/10 (previous run: -11.43/10, +0.00)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
vscode intellisense not working with PyTorch - Stack Overflow
I gave it a try and Language server indeed fixes that issue, but there are 2 issues here, it doesnt work on namespaces...
Read more >IntelliSense in Visual Studio Code
IntelliSense. IntelliSense is a general term for various code editing features including: code completion, parameter info, quick info, and member lists.
Read more >Code autocomplete problem - PyTorch Forums
I just started learning pytorch, I don't quite understand why I can't use auto-completion for some functions in Pycharm and VS Code.
Read more >Autocomplete | Python in Visual Studio Code
1. Intellisense/Autocompletion not working for custom modules · Cause: The path to the python executable is incorrect. Solution: Configure the path to the...
Read more >Getting Started with PyTorch 1.5 on Windows
This article assumes you have intermediate or better programming skill with a C-family language but doesn't assume you know anything about ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When using Jedi, the auto completion list is provided by an external package and we do not have much control over that. Please feel free to report an issue on their repo https://github.com/davidhalter/jedi.
On the other hand the language server is something that’s built by us. Hence I’ll be moving this issue to the language server repo so they can address the issues/concerns you have.
@DonJayamanne In the gif I posted above, I tested both scenarios, both with jediEnabled set to true and false! Just watch the whole gif to the end and you’ll see the difference between the two. I start with JediEnabled and show how it works, and then disable it and show how language server works