[codex] Add high-throughput Lance image reader - #10
Draft
VibhuJawa wants to merge 1 commit into
Draft
Conversation
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
imageby default, and execute 32 scans concurrently in one long-lived Ray actorSessionwith a 4 GiB index-cache limit and expose version-local fragment/row-offset work keys without reading extra columnsLANCE_CPU_THREADS=16,LANCE_IO_THREADS=64) while keeping each setting configurablepylance>=7.0.0Benchmark basis
On the production object-store benchmark, 40 fragments x 100 contiguous rows returned 4,000 encoded images at 225.7 images/s and 52.3 MiB/s with the public fragment scanner. The comparable public
fragment.takepath reached 229.5 images/s. The scanner path is used here because it is public, supported, and avoids URL B-tree fan-out for bulk reads.The reader deliberately does not compact or redistribute data. Coordinates are explicitly pinned to a dataset version.
Test plan
uv run ruff check nemo_curator/stages/image/io/lance_reader.py nemo_curator/stages/image/io/__init__.py tests/stages/image/io/test_lance_reader.pyuv run --extra image_lance pytest -q -m "not gpu" tests/stages/image/io tests/stages/text/io/reader/test_lance.pyStack
This PR is intentionally based on
feat/mint-image-lance-workflow(draft PR #7) so its diff contains only the optimized read path.