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

Low disk space causes memory leak #13292

Open
1 of 2 tasks
oliver408i opened this issue Sep 2, 2024 · 3 comments
Open
1 of 2 tasks

Low disk space causes memory leak #13292

oliver408i opened this issue Sep 2, 2024 · 3 comments
Labels
bug Something isn't working python Pull requests that update Python code

Comments

@oliver408i
Copy link

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Training

Bug

Having only a few gbs of disk space left when running yolov5's train.py causes a memory leak that will cause the computer to lag and eventually kill the yolov5 process. For example, I had ~2 gb of disk space left, and the after a few epochs of training, the "out of application memory" prompt starts popping up, and after a few more epochs, the process is killed by the system for using too much ram.

Environment

YOLOv5 🚀 v7.0-358-gc07b9a8b Python-3.12.5 torch-2.4.0 MPS
MacOS 15. Macbook pro m2 (16 GB ram)

Minimal Reproducible Example

Simply run a decently large dataset (in my case, 300 images) on at least 10 epochs. Using CPU or mps doesn't matter in this case.

Additional

I'm not sure if this is a global problem or just with Macos specifically, as I haven't been able to test it out. I suggest the program to warn the user about low disk space, because the system ram warning made it seem like it was my ram at fault instead of my disk space. Everything works as normal after I cleared up the disk space, using the exact same setup as before.

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@oliver408i oliver408i added the bug Something isn't working label Sep 2, 2024
@UltralyticsAssistant UltralyticsAssistant added the python Pull requests that update Python code label Sep 2, 2024
@glenn-jocher
Copy link
Member

@oliver408i thank you for reporting this issue. Please verify if the problem persists with the latest version of YOLOv5. If it does, we recommend ensuring sufficient disk space before training, as low disk space can impact performance. Your suggestion for a disk space warning is noted and appreciated.

@oliver408i
Copy link
Author

Yea I was. I cleared my disk and it works fine now. I just wanted to suggest that a warning be added to avoid other people from spending hours trying to fix this issue only to realize that it was a simple issue. Thanks for responding

@glenn-jocher
Copy link
Member

@oliver408i thank you for the feedback. We'll consider adding a disk space warning to help prevent similar issues in the future. If you encounter any other problems, please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

3 participants