IDE autocompletion support: which base class to use for variables\tensors?

Hi! I was wondering which class would you recommend to use when one defines function that takes variables or tensors as inputs and performs some transformations to enable autocompletion and etc. in IDE? There seem to be no such thing as torch.Tensor , I was trying torch.FloatTensor or _TensorBase but they seem lacking definitions of methods like torch.sum and etc. - they are defined implicitly via C extensions I guess, so pycharm can not see them.

Thanks!

upd: maybe someone built some sort of stub files?

i think someone’s fixed these in master. soon to appear in the next release.

hi, thanks for the answer! could you please let me know what exactly was fixed in master? :slight_smile: do you have some nice base class that has declarations of all required methods now?

This is related to #6194.

I have the same problem with Pycharm.

With ipython everything works fine, autocomplete finds everything, and the python interpreter is the same.

Please let us know when this issue is fixed