Skip to content
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

Memory leak when training multiple models sequentially #8463

Closed
tchaton opened this issue Jul 19, 2021 · 1 comment · Fixed by #8490
Closed

Memory leak when training multiple models sequentially #8463

tchaton opened this issue Jul 19, 2021 · 1 comment · Fixed by #8490
Assignees
Labels
bug Something isn't working help wanted Open to be worked on
Milestone

Comments

@tchaton
Copy link
Contributor

tchaton commented Jul 19, 2021

🐛 Bug

Please reproduce using the BoringModel

It seems there might be some memory link related to optimizer states still on GPU.

Check out: https://discuss.pytorch.org/t/how-to-avoid-memory-leak-when-training-multiple-models-sequentially/100315/5

To Reproduce

Use following BoringModel and post here

Expected behavior

Environment

Note: Bugs with code are solved faster ! Colab Notebook should be made public !

You can get the script and run it with:

wget https://raw.githubusercontent.com/PyTorchLightning/pytorch-lightning/master/tests/collect_env_details.py
# For security purposes, please check the contents of collect_env_details.py before running it.
python collect_env_details.py
  • PyTorch Lightning Version (e.g., 1.3.0):
  • PyTorch Version (e.g., 1.8)
  • Python version:
  • OS (e.g., Linux):
  • CUDA/cuDNN version:
  • GPU models and configuration:
  • How you installed PyTorch (conda, pip, source):
  • If compiling from source, the output of torch.__config__.show():
  • Any other relevant information:

Additional context

@tchaton tchaton added bug Something isn't working help wanted Open to be worked on labels Jul 19, 2021
@edenlightning edenlightning added this to the v1.3.x milestone Jul 19, 2021
@awaelchli
Copy link
Contributor

possibly the same as here: #8430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants