Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pylint can't recoginize the torch, always have the red line #11213

Closed
JonOnEarth opened this issue Apr 16, 2020 · 4 comments
Closed

pylint can't recoginize the torch, always have the red line #11213

JonOnEarth opened this issue Apr 16, 2020 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@JonOnEarth
Copy link

Issue Type: Bug

Hi,
Just as the topic said, I have tried lots of methods online, but None is effective.
One suggests add the code in pylint,''generated-members=numpy.,torch.''
Yes, it works for some code(some still have a red line), but other errors can't be marked it out either because of adding the code.
It troubled me a lot, I like VScode, but this is really annoying problem.

Extension version: 2020.3.71659
VS Code version: Code 1.44.1 (a9f8623ec050e5f0b44cc8ce8204a1455884749f, 2020-04-11T01:47:00.296Z)
OS version: Darwin x64 19.4.0

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 1
Memory (System) 16.00GB (0.48GB free)
Process Argv -psn_0_2425424
Screen Reader no
VM 0%
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Apr 16, 2020
@karthiknadig karthiknadig self-assigned this Apr 16, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 16, 2020
@karthiknadig karthiknadig added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug and removed triage-needed Needs assignment to the proper sub-team labels Apr 16, 2020
@karthiknadig
Copy link
Member

@JonOnEarth Can you run pylint from a terminal (not from withing VSCode) and see if this issue occurs?

@JonOnEarth
Copy link
Author

JonOnEarth commented Apr 24, 2020

@JonOnEarth Can you run pylint from a terminal (not from withing VSCode) and see if this issue occurs?

Hi, this is the part of the result I run from a terminal.

retrian.py:81:12: E1101: Module 'torch' has no 'mm' member (no-member)
retrian.py:81:32: E1101: Module 'torch' has no 'inverse' member (no-member)
retrian.py:82:8: C0103: Variable name "P_plus" doesn't conform to snake_case naming style (invalid-name)
retrian.py:82:34: E1101: Module 'torch' has no 'mm' member (no-member)
retrian.py:82:43: E1101: Module 'torch' has no 'mm' member (no-member)
retrian.py:83:42: E1101: Module 'torch' has no 'matmul' member (no-member)

@karthiknadig
Copy link
Member

@JonOnEarth Looks like pylint is not able work with torch, since it occurs outside of VS Code. It is a third party library you will have to file this issue on pylint: https://github.com/PyCQA/pylint

@JonOnEarth
Copy link
Author

oh, okay. thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants