-
Notifications
You must be signed in to change notification settings - Fork 137
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
Optimize Python import to make CLI entrypoint faster #1182
Optimize Python import to make CLI entrypoint faster #1182
Conversation
Signed-off-by: Kim, Vinnam <[email protected]>
Signed-off-by: Kim, Vinnam <[email protected]>
Signed-off-by: Kim, Vinnam <[email protected]>
…gin-import-v2 Signed-off-by: Kim, Vinnam <[email protected]>
Signed-off-by: Kim, Vinnam <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #1182 +/- ##
===========================================
- Coverage 80.09% 80.06% -0.04%
===========================================
Files 267 268 +1
Lines 29828 29849 +21
Branches 5846 5847 +1
===========================================
+ Hits 23892 23898 +6
- Misses 4602 4618 +16
+ Partials 1334 1333 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Signed-off-by: Kim, Vinnam <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good. Thank you for your efforts.
Summary
Environment._get_plugin_exports()
not to load classes underdatumaro.components.*
.datumaro.util.import_util.lazy_import()
to import some heavy external modules (e.g.,tensorflow
,matplotlib
, ...) lazily.develop
)How to test
Our existing tests can cover this.
Checklist
License
Feel free to contact the maintainers if that's a concern.