Skip to content

Make it possible to use mypy to typecheck code that uses PyTorch #16574

@ezyang

Description

@ezyang

We generated a type stub for torch module in , which is good enough to get autocomplete working in PyCharm. However, the type stub is not that well tested for actually, you know, accurately reflecting the types of our functions (we have light testing, but it's not enough) and it's unlikely that it's actually good enough to actually use mypy to typecheck PyTorch-using code. It seems like this is something that people might be interested in, so I'm creating this issue to track. Please emoji if this is something that you would use.

cc @ezyang @gchanan @zou3519

Metadata

Metadata

Assignees

Labels

featureA request for a proper, new feature.high prioritymodule: typingRelated to mypy type annotationstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions