Skip to content

Fix three image pipeline robustness bugs#14

Merged
FANNG1 merged 1 commit into
mainfrom
worktree-image-pipeline-fixes
Jul 7, 2026
Merged

Fix three image pipeline robustness bugs#14
FANNG1 merged 1 commit into
mainfrom
worktree-image-pipeline-fixes

Conversation

@FANNG1

@FANNG1 FANNG1 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • embed_image_bytes now catches PIL decode failures and returns None instead of raising — a single bad image (readable by cv2 but not PIL, e.g. a truncated JPEG) no longer kills an entire --embed Stage 1 run.
  • Stage 2 ingest now marks rows as blob_download_failed when the Stage-1-ok row's blob re-download fails, instead of silently leaving status=ok with a null image_blob in the asset table.
  • Stage 2 ingest casts all-null analysis columns (from JSONL type inference on an all-failed batch) to their canonical dtypes before writing, so an all-failed batch can no longer create a Lance table with null-typed columns that rejects later appends.

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)
  • Added tests/image/test_ingest.py covering blob-download-failure status override and all-failed-batch schema poisoning
  • Added a decode-failure regression test in tests/image/test_embedding_pipeline.py

- 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
@FANNG1 FANNG1 merged commit 150b037 into main Jul 7, 2026
1 check passed
@FANNG1 FANNG1 deleted the worktree-image-pipeline-fixes branch July 7, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant