Trainer check #6029
gianscarpe
started this conversation in
Idea pool
Trainer check
#6029
Replies: 1 comment 1 reply
-
Hi @gianscarpe! Thanks for the suggestion How does this differ from running a tool like |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Add a Trainer.check(...) interface that checks all your subclassed methods for (programatically) correctness.
I propose to add a check function inside LightningModule. This function uses inspect
library to check that each overriden function of the LightningModule subclass
respect the correct signature.
E.g., training_epoch_end, if defines, should have two inputs (self:
LightningModule and outputs: List) and should return None
The same check can be defined for LightiningCallbacks and
LightningDataModule. trainer.check should call each check function and raise
an specific exception (something like ProgrammaticallyError exception) if some
check fail.
Note: we can exploit object-orientation; the user can defined is own check
function for its own module
What do you think? Any suggestions are really appreciated! :)
#3244
Beta Was this translation helpful? Give feedback.
All reactions