ultralytics / ultralytics

Ultralytics YOLO11 πŸš€
https://docs.ultralytics.com
GNU Affero General Public License v3.0
36.33k stars 7k forks source link

`ultralytics 8.3.71` require explicit `torch.nn` usage #19067

Closed glenn-jocher closed 5 days ago

glenn-jocher commented 5 days ago

To help disambiguate torch.nn and ultralytics.nn.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Updated the codebase to replace nn with torch.nn for improved clarity and code convention compliance, alongside dependency fixes and enhancements to the documentation build.

πŸ“Š Key Changes

🎯 Purpose & Impact

These changes collectively result in better maintainability, usability, and reliability for both developers and users. πŸš€

UltralyticsAssistant commented 5 days ago

πŸ‘‹ Hello @glenn-jocher, thank you for submitting an ultralytics/ultralytics πŸš€ PR! To ensure a seamless integration of your work, please review the following checklist:

Your PR to pin mkdocs-material<=9.6.1 looks great and addresses potential compatibility issues effectively! πŸŽ‰ If you haven’t already, verify that this update resolves the intended issues during your documentation builds, and ensure any necessitated dependencies are compatible with this version range.

For more guidance, please refer to our Contributing Guide. Don’t hesitate to leave a comment if you have any questions. An Ultralytics engineer will review your PR and assist you further soon! πŸš€

codecov[bot] commented 5 days ago

Codecov Report

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

Project coverage is 73.08%. Comparing base (17450e9) to head (224d120). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ultralytics/nn/tasks.py 47.82% 12 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #19067 +/- ## ========================================== - Coverage 73.12% 73.08% -0.04% ========================================== Files 129 129 Lines 17486 17485 -1 ========================================== - Hits 12786 12779 -7 - Misses 4700 4706 +6 ``` | [Flag](https://app.codecov.io/gh/ultralytics/ultralytics/pull/19067/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | Coverage Ξ” | | |---|---|---| | [Benchmarks](https://app.codecov.io/gh/ultralytics/ultralytics/pull/19067/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | `34.08% <32.14%> (-0.04%)` | :arrow_down: | | [GPU](https://app.codecov.io/gh/ultralytics/ultralytics/pull/19067/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | `37.94% <46.42%> (-0.01%)` | :arrow_down: | | [Tests](https://app.codecov.io/gh/ultralytics/ultralytics/pull/19067/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | `66.90% <57.14%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics#carryforward-flags-in-the-pull-request-comment) to find out more.

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

UltralyticsAssistant commented 5 days ago

🌟 Thank you, @glenn-jocher and @RizwanMunawar, for another impactful contribution! 🌟

As Albert Einstein once said, "Strive not to be a success, but rather to be of value." This incredible PR embodies that sentiment perfectly, bringing clarity, stability, and user-centric enhancements to the Ultralytics codebase. By championing explicit conventions like torch.nn, ensuring smoother documentation builds, and refining progress visualization, you've not only strengthened the foundation for developers but also elevated the entire user experience. πŸš€

Your dedication and expertise continue to inspire us allβ€”thank you for making Ultralytics better, one thoughtful improvement at a time ❀️✨