I'm running PyCharm on Windows 10, and installed PyTorch following the getting started guide. Where I used Chocolatey and Anaconda to set up everything.
I can run the PyTorch tutorials from inside the PyCharm IDE without any problems. So I feel like I have a proper set up, but there aren't any intellisense documentations for any of the PyTorch APIs.
For example;
import torch
x = torch.randn(128, 20)
If I mouse over randn
and press CTRL+Q then PyCharm shows me a popup of the function definition without any documentation.
I'm expecting to see Python comments from the API documentation for that function:
https://pytorch.org/docs/stable/torch.html?highlight=randn#torch.randn
I'm a new beginner with Pytorch and Python, but this is something that I often have access to from inside the IDE with many other languages and libraries. So I feel like this should be possible to get working, but I can't seem to find any instructions on how to fix this.
I was able to get it working by doing the following:
PyStorm 2019.3
Open the settings for external documentation:
File / Settings / Tools / External Documentation
Add the following URL patterns:
Module Name: torch.nn.functional
URL: https://pytorch.org/docs/stable/nn.functional.html#{element.qname}
Module Name: torch
URL: https://pytorch.org/docs/stable/{module.basename}.html#{element.qname}
Seems to work for most APIs but you have to trigger the quick documentation tool window. This won't show docs if you CTRL+CLICK
something.
You probably want to get Kite. It has this feature (that I use intensively) called co-pilot where you can get python docs immediately. I don't know if it's Linux/Mac specific but works for any editor, nit just Pycharm.
It's just another solution
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