Fix three image pipeline robustness bugs#14
Merged
Conversation
- embed_image_bytes returns None instead of raising when PIL cannot decode bytes that cv2 accepted (a single bad image no longer kills a --embed Stage 1 run) - Stage 2 marks previously-ok rows whose blob download fails as blob_download_failed instead of leaving status=ok with a null blob - Stage 2 casts all-null analysis columns from JSONL type inference to their canonical dtypes so an all-failed batch cannot create a Lance table with null-typed columns that rejects later appends
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
embed_image_bytesnow catches PIL decode failures and returnsNoneinstead of raising — a single bad image (readable by cv2 but not PIL, e.g. a truncated JPEG) no longer kills an entire--embedStage 1 run.blob_download_failedwhen the Stage-1-okrow's blob re-download fails, instead of silently leavingstatus=okwith a nullimage_blobin the asset table.Test plan
uv run pytest tests/image/ -x -q(43 passed, includes real-model e2e)uv run pytest tests/ --ignore=tests/image -q(38 passed)tests/image/test_ingest.pycovering blob-download-failure status override and all-failed-batch schema poisoningtests/image/test_embedding_pipeline.py