Autocompletion does not work in torch.nn module

🐛 Bug

I’m using PyCharm Pro 2020.2 and in PyTorch v1.5.1, I could type torch.nn and the IDE would suggest Conv1d etc., but after updating to v1.6.0, I don’t see that anymore.

To Reproduce

Steps to reproduce the behavior:

  1. Install PyTorch v.1.6.0
  2. import torch.nn as nn
  3. Type any class of layer or loss function defined under torch.nn on the PyCharm editor.

Expected behavior

v1 6 0-v 1 5 1


PyCharm Professional 2020.2

PyTorch version: 1.6.0
Is debug build: False
CUDA used to build PyTorch: None

OS: Mac OSX 10.15.6 (x86_64)
GCC version: Could not collect
Clang version: 7.0.0 ( b3057cffb63ed229b4552d57264414b4419fdb47)
CMake version: version 3.16.3

Python version: 3.7 (64-bit runtime)
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip3] numpy==1.19.1
[pip3] torch==1.6.0
[conda] blas 1.0 mkl
[conda] libblas 3.8.0 14_mkl conda-forge
[conda] libcblas 3.8.0 14_mkl conda-forge
[conda] liblapack 3.8.0 14_mkl conda-forge
[conda] mkl 2019.4 233
[conda] mkl-service 2.0.2 py37h1de35cc_0
[conda] mkl_fft 1.0.12 py37h5e564d8_0
[conda] mkl_random 1.0.2 py37h27c97d8_0
[conda] numpy 1.16.4 py37hacdab7b_0
[conda] numpy-base 1.16.4 py37h6575580_0
[conda] numpydoc 0.9.1 py_0

Additional context

cc @albanD @mruberry @ezyang @malfet @rgommers

1 possible answer(s) on “Autocompletion does not work in torch.nn module