vscode-python: Argument suggestions for some functions in the pytorch module are duplicated when using Jedi

image

Reproduce

import time
import torch
from torch import nn, optim
import sys
import d2lzh_pytorch as d2l

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')


def nin_block(in_channels, out_channels, kernel_size, stride, padding):
    blk = nn.Sequential(
        nn.Conv2d(in_channels, out_channels, kernel_size, stride, pad)
    )

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 25 (4 by maintainers)

Most upvoted comments

@ericsnowcurrently @karthiknadig This problem still exists, do you have any plans to fix this problem, otherwise, I can only use pylance as an alternative.

Okay, it works better than jedi , but worse than pylance๐Ÿ˜ฅ

version: 1.46.1 (user setup) commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d date: 2020-06-17T21:13:20.174Z Electron: 7.3.1 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.18363

language server: use Jedi

This is definitely a bug, many function parameter prompts will have duplicate snippets In standard and third-party libraries. ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚
image image