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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch.Tag doesn't have accurate mypy info #83313

Open
ezyang opened this issue Aug 12, 2022 · 3 comments
Open

torch.Tag doesn't have accurate mypy info #83313

ezyang opened this issue Aug 12, 2022 · 3 comments
Labels
module: typing Related to mypy type annotations triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@ezyang
Copy link
Contributor

ezyang commented Aug 12, 2022

馃悰 Describe the bug

  Error (MYPY) [attr-defined]
    Module has no attribute "Tag"

        151  |        r = func_overload.decompose(*args, **kwargs)
        152  |        if r is not NotImplemented:
        153  |            return r
    >>> 154  |    if torch.Tag.data_dependent_output in func_overload.tags:
        155  |        # Check if all of the Tensor inputs are constants
        156  |        all_constant = True
        157  |

Versions

master

cc @ezyang @malfet @rgommers @xuzhao9 @gramster

@malfet malfet added module: typing Related to mypy type annotations triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Aug 12, 2022
@malfet
Copy link
Contributor

malfet commented Aug 12, 2022

What module is it part of? And what's your mypy version

@ezyang
Copy link
Contributor Author

ezyang commented Aug 12, 2022

it's a pybind11 enum codegen from torch._C

@eellison
Copy link
Contributor

eellison commented Nov 17, 2022

Any update on this ? There are a ton of # type: ignore[attr-defined] being added everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: typing Related to mypy type annotations triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants