Hotfix some mis-implements making datum stream importer slow #1098
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
_get_dm_format_version()
faster when there is nodm_format_version
field in the file._load_media_type()
faster when there is nomedia_type
field in the file.TQDMProgressReporter
whentotal
is not given (total = None
)How to test
I manually tested the following code on the real-life COCO2017 object detection dataset which is converted to Datumaro (JSON) data format.
Results:
Checklist
License
Feel free to contact the maintainers if that's a concern.