ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
47.78k stars 15.73k forks source link

Set `TORCH_CPP_LOG_LEVEL=ERROR` for reduced verbosity #12989

Closed inisis closed 2 weeks ago

inisis commented 3 weeks ago

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced Logging Control in YOLOv5 Export Script ✨

📊 Key Changes

🎯 Purpose & Impact

github-actions[bot] commented 3 weeks ago

CLA Assistant Lite bot All Contributors have signed the CLA. ✅

inisis commented 3 weeks ago

I have read the CLA Document and I sign the CLA

glenn-jocher commented 3 weeks ago

@inisis thanks for the PR! What type of output are you seeing that will help suppress?

BTW we have an issue with ultralytics that we'd like to switch to PyTorch's built-in profiler but we have a similar problem that it is too verbose. Do you have any idea how we can silence these logging messages?

If we can figure out how to quiet the native FLOPs function down then we could migrate to it and ditch thop alltogether (would be awesome to eliminate an unmaintained dependency). The too-verbose output looks like this:

Screenshot 2024-05-05 at 19 35 54
inisis commented 3 weeks ago

@glenn-jocher for you first question, here are the screen shot. image and my pr can help fix it.

and for your second question, we can add export KINETO_LOG_LEVEL=5 to supress it, image I can help pr it.

glenn-jocher commented 3 weeks ago

Thanks for the screenshots, @inisis! Your PR looks promising for addressing the log issue in the first screenshot. 😊 For suppressing verbose output from PyTorch's built-in profiler as indicated in the second screenshot, setting KINETO_LOG_LEVEL=5 sounds like a great approach. It would be fantastic if you could submit a PR for that as well! 🚀

inisis commented 3 weeks ago

@glenn-jocher can you cc me in that issue in ultralytics , i searched but didn't find it. and I think this pr can be merged and closed.

glenn-jocher commented 2 weeks ago

Hi @inisis! I'll make sure to mention you in the relevant issue on ultralytics once it's up for easier tracking. Regarding this PR, we'll review it shortly and merge if everything checks out. Thanks for your contributions! 😊👍