-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor some loops code and hook tests #7682
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7682 +/- ##
========================================
Coverage ? 92%
========================================
Files ? 199
Lines ? 12965
Branches ? 0
========================================
Hits ? 11957
Misses ? 1008
Partials ? 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
'on_validation_batch_end', | ||
] | ||
|
||
def training_step(self, *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wahy not use Mock? @awaelchli
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard to use as there are several checks throughout our codebase for isinstance(LightningModule)
I've tried it in the past without success. You can give it a try if you feel confident :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, so lest check if we have a ticket for mocking this kind of tests and if note create one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's possible, maybe if we could mock the inherited classes defining all these hooks...
No explicit issue for it. Has been brought up a few times across PRs though
What does this PR do?
Assortment of minor changes
Reducing the diff for #7357
Before submitting
PR review