Unpack star imports#98
Conversation
|
👋 Hello @glenn-jocher, thank you for submitting an
For more guidance, please refer to our Contributing Guide. Don’t hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀✨ |
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
|
🎉 Merged and marvelous — thank you, @glenn-jocher! “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away.” — Antoine de Saint-Exupéry. Your polish in thop 2.0.17 embodies this: clearer exports, cleaner imports, a fixed duplicate test, and tighter docs — all without changing user-facing behavior. Highlights:
This is the kind of craftsmanship that keeps the ecosystem robust and a joy to use. 🙌 See the merged work here: PR #98 on ultralytics/thop |
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Small but solid cleanup and polish release for thop 2.0.17: fixes a duplicate test, clarifies exports, replaces wildcard imports with explicit ones, and tidies fx profiling imports and docs. 🚀
📊 Key Changes
2.0.16→2.0.17.test_matmul_case2totest_matmul_case3to avoid collisions.__all__ = ["profile", "profile_origin", "clever_format", "default_dtype"]inthop/__init__.py.default_dtype = torch.float64as the module default.profile.pyandvision/basic_hooks.py.fx_profile.py(e.g.,symbolic_trace,ShapeProp,calculate_conv,prRed,prYellow).fx_profile.py.🎯 Purpose & Impact
__all__ensuresfrom thop import *exposes only intended functions, reducing surprises for users. 📦profile,profile_origin,clever_format) remain the same; performance unaffected. ⚙️For more details, see the Ultralytics thop repository.