-
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
add memory parity for PL vs Vanilla #5170
Conversation
Hello @Borda! Thanks for updating this PR.
Comment last updated at 2020-12-23 18:49:05 UTC |
Codecov Report
@@ Coverage Diff @@
## master #5170 +/- ##
=======================================
+ Coverage 89% 93% +4%
=======================================
Files 134 134
Lines 9942 9942
=======================================
+ Hits 8873 9256 +383
+ Misses 1069 686 -383 |
(ParityModuleMNIST, 0.25), # todo: lower this thr | ||
@pytest.mark.parametrize('cls_model,max_diff_speed,max_diff_memory', [ | ||
(ParityModuleRNN, 0.05, 0.0), | ||
(ParityModuleMNIST, 0.25, 0.0), # todo: lower this thr |
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.
Is it really 0.0 still? I know you investigated a bit was curious. It doesn't seem correct but maybe that's because of how small the memory difference is (memory usage is tiny) Maybe move to a significant figure 1e-5?
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 think so, the model is super small and we run just 4 epochs
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.
Not sure adding memory check for such small models make sense.
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.
what difference does it make how big the models are?
max_diff_memory there is the difference between the pytorch run and the lightning run with the SAME model. It's perfectly fine if lightning uses the same amount of memory as pytorch. in fact, how would you even explain any other numbers?
There is no logging, no fancy Lightning features, nothing that should occupy extra memory on the gpu.
(ParityModuleMNIST, 0.25), # todo: lower this thr | ||
@pytest.mark.parametrize('cls_model,max_diff_speed,max_diff_memory', [ | ||
(ParityModuleRNN, 0.05, 0.0), | ||
(ParityModuleMNIST, 0.25, 0.0), # todo: lower this thr |
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.
Not sure adding memory check for such small models make sense.
Co-authored-by: chaton <[email protected]>
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.
The memory check for a small model doesn't make sense, but I'd keep it for a future test where we might try a larger model (I think we should).
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
see my comment above regarding model size (which does not matter if I understand the tests correctly)
* refactor * memory * show * clean * clean * try * device * reset * fix * fix * mean * hook * format * add todo Co-authored-by: chaton <[email protected]> Co-authored-by: chaton <[email protected]> (cherry picked from commit 6adc1b3)
What does this PR do?
adding memory parity...
Resolves #2080
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃