Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

IntelliSense not working for torch.nn #1799

@Salzy

Description

@Salzy

Environment data

  • Language Server version: 0.4.114.0
  • OS and version: Debian 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.3 (Miniconda - CondaForge)
  • PyTorch version: 1.3.0 and 1.3.1

Expected behaviour

Auto-completion through IntelliSense when typing (i.e. torch.nn. ).

Actual behaviour

Auto-completion does not work for torch.nn. However, it works for other modules like torch.nn.functional.

I already tried to delete the language server directory and restarting VSCode. In addition, I already switched to beta, but nothing changed.

There are already closed related issues:
Intellisense doesnt work for all Pytorch methods
torch.nn missing from torch module and from torch import completions

Logs

Analysis of models.GAN.gan (User) queued. Dependencies: torch, torch.nn
Completions in file:///home/p***/Generative-models/models/GAN/gan.py at (19, 24)
Analysis version 4594 of 1 entries has started.
Analysis of models.GAN.gan (User) on depth 0 completed in 0.48 ms.
Analysis complete: 1 modules in 17.34 ms.
Analysis version 4594 of 1 entries has been completed in 0.66 ms.
IntelliCode identified 3 likely completion items.

Code Snippet / Additional lnformation

from torch import nn

class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.model = nn.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions