Replace pkg_resources with packaging#13707
Conversation
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
|
👋 Hello @Y-T-G, thank you for submitting a -✅ Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions. For more guidance, please refer to our Contributing Guide. This is an automated message 🤖—an Ultralytics engineer will assist soon. If you have any questions, feel free to comment here 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
PR looks clean. The switch to packaging.version.parse appears behavior-neutral and no issues are evident in this diff.
|
Merged — huge thanks for the thoughtful improvement here, @Y-T-G! 🙌 As Leonardo da Vinci said, “Simplicity is the ultimate sophistication.” This PR is a perfect example: swapping out the heavier Really appreciate you taking the time to refine the details that make the whole project smoother for everyone. 🚀 |
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Replaces
pkg_resourcesversion checks withpackaging.version.parsefor Weights & Biases (W&B) login gating in YOLOv5 logging 🔧📈📊 Key Changes
import pkg_resources as pkg➜from packaging.version import parseparse(wandb.__version__) >= parse("0.12.2")wandb.login()when running on primary ranks (RANK in {0, -1}) 🚦🎯 Purpose & Impact
pkg_resources(often considered heavier and increasingly discouraged) ➜ cleaner dependency usage 🧹pkg_resourcesquirks are less likely to hit import/version issues ✅