I'm using a virtual environment and I have selected the right interpreter.
Now even after I cmd + p > reload window
and
import torch.nn as nn
I don't get any suggestion righting nn.
on vscode 1.31.1
I found jedi
to be quite slow but the recently released Pylance extension works like a charm: https://github.com/microsoft/pylance-release
and then update your settings
"python.languageServer": "Pylance"
Faced the same problem with vscode 1.42. Resolved the problem by going to Settings, Changing Python: Language server from Microsoft to Jedi. Now I can see autocomplete with torch.nn.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With