fix(streaming): do not auto-window JPEG and other per-item media - #899
Merged
Conversation
Restore ImageNet stream speed: a 16-row decode window plus item_shuffle_window=256 re-decoded each JPEG ~16×. Heavy per-item leaves now use batch_decode=1 and skip the window. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #899 +/- ##
=====================================
Coverage 81% 81%
=====================================
Files 67 67
Lines 15530 15547 +17
=====================================
+ Hits 12642 12666 +24
+ Misses 2888 2881 -7 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
PR #897 auto-windowed ~115KB JPEGs at 16 rows. With
item_shuffle_window=256that dropped and re-decoded the same ImageNet JPEGs (~15×decode_jpeg, 120k for 8k items) and cut epoch-1 from 10,441 → 1,974 img/s at 48 workers.Heavy per-item leaves (JPEG / image / audio / video / …) now use
batch_decode=1and skip_store_decode_window. Cheap leaves (text, ints, small tensors) still batch. Full epoch on this patch: 10,380 img/s.test_shuffled_jpeg_auto_batch_decodes_oncestreams a shuffled JPEG dataset and asserts onedecode_jpegper item, plus_auto_batch_rows/_item_only_batch== 1 whenjpegis indata_format.Test plan
test_batch_rows_for_format— JPEG auto window is 1; tensors/text can still batchtest_shuffled_jpeg_auto_batch_decodes_once— shuffle + JPEG decodes once per itemtests/streaming/test_item_loader.py(56 passed)Made with Cursor