-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhance] Remove unnecessary calls and lazily import to speed up import performance #837
[Enhance] Remove unnecessary calls and lazily import to speed up import performance #837
Conversation
Codecov ReportBase: 78.66% // Head: 78.74% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #837 +/- ##
==========================================
+ Coverage 78.66% 78.74% +0.08%
==========================================
Files 128 128
Lines 9348 9374 +26
Branches 1848 1859 +11
==========================================
+ Hits 7354 7382 +28
+ Misses 1679 1678 -1
+ Partials 315 314 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…da/mmengine into speed-import-performance
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Speed the performance when calling
import mmengine.runner
.Using pyinstrument to test the difference in performance.
Modification
Remove unnecessary calls to speed import performance
The above line heavily slows the import performance and this line is not necessary. Therefore, remove this line.
Layily import torchvision, matplotlib, and pkg_resources to speed the import performance.
BC-breaking (Optional)
No
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist