Open hzhangxyz opened 10 months ago
""" Test pytorch linalg module with pylint """ import torch def my_qr_decomposition(tensor: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]: """ My QR """ tensor_q, tensor_r = torch.linalg.qr(tensor) return tensor_q, tensor_r
No response
python -m pylint main.py "--generated-member=torch.*,torch.linalg.*"
************* Module main main.py:12:25: E1102: torch.linalg.qr is not callable (not-callable) ----------------------------------- Your code has been rated at 0.00/10
It is expected that pylint knows torch.linalg.qr is callable
pylint 3.0.2 astroid 3.0.1 Python 3.11.5 (main, Aug 28 2023, 12:39:56) [GCC 11.4.0]
github action, see details at https://github.com/hzhangxyz/test-pytorch-linalg-pylint/actions/runs/6761431449/job/18376293735 .
Note: pylint 2.17.7 works well in this examples.
pytorch==2.0.1+cpu
I'm experiencing the same with some of the torch functionals (torch.nn.functional.(pad|conv2d)).
torch.nn.functional.(pad|conv2d)
Bug description
Configuration
No response
Command used
Pylint output
Expected behavior
It is expected that pylint knows torch.linalg.qr is callable
Pylint version
OS / Environment
github action, see details at https://github.com/hzhangxyz/test-pytorch-linalg-pylint/actions/runs/6761431449/job/18376293735 .
Note: pylint 2.17.7 works well in this examples.
Additional dependencies