-
Notifications
You must be signed in to change notification settings - Fork 3
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
Memfix #106
Conversation
Should we place it in Two benefits:
|
@ibro45 We can call it either on batch start or end, does not make a difference. I am quite certain nothing accesses |
Do we want this by default in I am thinking of moving it to the writer because this is unexplained behaviour should someone try to use their own writer and try to save predictions at the end of the epoch |
lighter/lighter/callbacks/writer/base.py Line 108 in ca9794e Would be placed here instead |
Good point let's do that
…On Fri, Feb 2, 2024 at 16:25 Suraj Pai ***@***.***> wrote:
https://github.com/project-lighter/lighter/blob/ca9794e247c886554a88bfcafcf4b910b7037f73/lighter/callbacks/writer/base.py#L108
Would be placed here instead
—
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEJOMLG3OSNQT3GT4NOB3Y3YRVKVRAVCNFSM6AAAAABCXGHWD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRUG4ZDEMBYHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Lgtm |
Addresses #82
Lightning-AI/pytorch-lightning#15656
does not seem to fix the memory leak - memory usage keeps increasing.
Adding the garbage collector keeps the memory usage constant throughout the prediction loop.
For good measure, I have also added code to clear the
_predictions
in thepredict_loop
of the trainer that causes accumulation during the batch. I figure the gc already clears this but added it nonetheless