(retriever) add image file ingestion (PNG, JPEG, BMP, TIFF, SVG)#1524
Merged
jdye64 merged 5 commits intoNVIDIA:mainfrom Mar 10, 2026
Merged
(retriever) add image file ingestion (PNG, JPEG, BMP, TIFF, SVG)#1524jdye64 merged 5 commits intoNVIDIA:mainfrom
jdye64 merged 5 commits intoNVIDIA:mainfrom
Conversation
jdye64
reviewed
Mar 10, 2026
| exts = ext_map.get(input_type, ["*.pdf"]) | ||
| import glob as _glob | ||
|
|
||
| all_candidates = [str(input_path / e) for e in exts] |
Collaborator
There was a problem hiding this comment.
I think using local is fine for now but something we should consider later is Ray data allows users to specify object stores like S3 and this logic would break in that situation
| # Raster formats handled natively by Pillow. | ||
| _RASTER_EXTENSIONS = {".png", ".jpg", ".jpeg", ".bmp", ".tiff", ".tif"} | ||
|
|
||
| # SVG requires cairosvg (optional dependency). |
Collaborator
There was a problem hiding this comment.
should we add this in the pyproject.toml as an optional dependency then?
Collaborator
Author
There was a problem hiding this comment.
I think it's a good idea. Added to pyproject.toml as an optional dep.
| try: | ||
| import cairosvg # type: ignore[import-untyped] | ||
| except ImportError: | ||
| raise ImportError("cairosvg is required for SVG image support. " "Install it with: pip install cairosvg") |
Collaborator
There was a problem hiding this comment.
Maybe this is good enough for now
|
|
||
| def extract_image_files(self, params: ExtractParams | None = None, **kwargs: Any) -> "FusedIngestor": | ||
| """Fused mode does not yet support extract_image_files.""" | ||
| raise NotImplementedError("Fused mode does not yet support extract_image_files") |
Collaborator
There was a problem hiding this comment.
yeah probably gonna nuke fused mode for now anyway ...
jdye64
approved these changes
Mar 10, 2026
4 tasks
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.
Description
Checklist