ultralytics icon indicating copy to clipboard operation
ultralytics copied to clipboard

Better dataset error handling

Open ambitious-octopus opened this issue 1 year ago • 3 comments

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improved error handling for datasets in Ultralytics.

📊 Key Changes

  • Added a new DatasetError class for dataset-related issues.
  • Updated get_dataset error handling to use DatasetError.

🎯 Purpose & Impact

  • Clearer Error Messages: Provides more informative messages when dataset errors occur, helping users troubleshoot effectively.
  • Enhanced User Guidance: Directs users to documentation for assistance, improving the user experience.

ambitious-octopus avatar Oct 02 '24 14:10 ambitious-octopus

Codecov Report

Attention: Patch coverage is 40.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 72.86%. Comparing base (72da276) to head (6e84691).

Files with missing lines Patch % Lines
ultralytics/data/utils.py 16.66% 5 Missing :warning:
ultralytics/data/base.py 40.00% 3 Missing :warning:
ultralytics/utils/errors.py 60.00% 2 Missing :warning:
ultralytics/data/dataset.py 50.00% 1 Missing :warning:
ultralytics/engine/trainer.py 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16634      +/-   ##
==========================================
- Coverage   72.89%   72.86%   -0.03%     
==========================================
  Files         133      133              
  Lines       17733    17742       +9     
==========================================
+ Hits        12926    12928       +2     
- Misses       4807     4814       +7     
Flag Coverage Δ
Benchmarks 33.78% <40.00%> (-0.02%) :arrow_down:
GPU 37.51% <40.00%> (+0.02%) :arrow_up:
Tests 66.75% <40.00%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 02 '24 14:10 codecov[bot]

@ambitious-octopus I don't think we need an entire class to deliver a help message. We have existing examples of this, no reason to reinvent the wheel:

https://github.com/ultralytics/ultralytics/blob/7d6528a41ac181daee2ef33fcdde5be0d57b0be7/ultralytics/utils/init.py#L1193-L1203

glenn-jocher avatar Oct 02 '24 18:10 glenn-jocher

👋 Hello there! We wanted to let you know that we've decided to close this pull request due to inactivity. We appreciate the effort you put into contributing to our project, but unfortunately, not all contributions are suitable or aligned with our product roadmap.

We hope you understand our decision, and please don't let it discourage you from contributing to open source projects in the future. We value all of our community members and their contributions, and we encourage you to keep exploring new projects and ways to get involved.

For additional resources and information, please see the links below:

  • Docs: https://docs.ultralytics.com
  • HUB: https://hub.ultralytics.com
  • Community: https://community.ultralytics.com

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

github-actions[bot] avatar Mar 12 '25 00:03 github-actions[bot]