Incompatible typing according to mypy #13003
Unanswered
DanielPerezJensen
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 2 comments 8 replies
-
Commenting this to bump it :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
@DanielPerezJensen I think the cause is that you're overriding their typing as the error says. For example, in your script, If you're intentionally overriding the type, you can just mark it as
|
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, since the introduction of Typing in Python I have tried to incorporate this into my workflow. I wanted to type one of my PyTorch Lightning models by typing the various forward and step functions of the model. I believe I have typed it correctly, but running mypy (v. 0.950) gives the following errors and warnings:
I was just wondering if this is due to me mistyping, which I am pretty sure I haven't, or that it might be some issue in MyPy or PyTorch Lightning. Any guidance is appreciated. The script I used is shown below, not sure if you can import it as it is dependant on some other files I have but if you need those as well I can add it down the line.
Beta Was this translation helpful? Give feedback.
All reactions