-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
config NUM_THREADS for caching data or make .cache file compatible #5685
Comments
@iumyx2612 thanks for the feedback! What value of NUM_THREADS works on your system then? I've never seen any issues here even in resource constrained environments like Colab free. |
I have to use NUM_THREADS = 4 so it doesn't crash. |
@iumyx2612 what happens if you do NUM_THREADS=6 or NUM_THREADS=7? |
7 is okay. I tested while still opening Pycharm and tons of Google Chrome tabs |
@iumyx2612 ok so it seems like a good first step is simply to update the code so that we leave at least 1 cpu free. NUM_THREADS = min(8, max(1, os.cpu_count() - 1)) |
Updated strategy leaves at least 1 cpu free to avoid system overloads. Partially addresses #5685
Updated strategy leaves at least 1 cpu free to avoid system overloads. Partially addresses #5685
@iumyx2612 good news 😃! Your original issue may now be fixed ✅ in PR #5706. To receive this update:
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀! |
The problem still persists, before I called |
Updated strategy leaves at least 1 cpu free to avoid system overloads. Partially addresses ultralytics#5685
Updated strategy leaves at least 1 cpu free to avoid system overloads. Partially addresses ultralytics/yolov5#5685
Search before asking
Description
So when I work with new dataset I have to cache data. But parameter NUM_THREAD is set too high cause program to crash
NUM_THREADS = min(8, os.cpu_count())
my
os.cpu_count()
is actually 8, it use up all of my cpus and causing crash.I usually train yolov5 using Google Colab and interact with it there. But I want to debug something, so I downloaded my .cache file from colab to my local computer. I thought I won't go through a caching stage, but hash from the .cache file I downloaded from colab
cache['hash']
appeared to have different hash fromget_hash(self.label_files + self.img_files)
because of the the path on google colab is different from my local computerUse case
Low-end computers
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: