fix: preserve native Ray blocks during pandas materialization - #2539
Merged
edknv merged 3 commits intoAug 18, 2026
Merged
Conversation
Contributor
Greptile SummaryThe PR updates Ray Dataset materialization to preserve each block’s native Arrow or pandas representation while retaining row-safe Arrow conversion.
|
| Filename | Overview |
|---|---|
| nemo_retriever/src/nemo_retriever/graph/executor.py | Preserves native Ray block formats during final materialization and converts object-backed tensor extension columns to ordinary pandas object columns. |
| nemo_retriever/tests/test_executor_arrow_pandas.py | Adds focused regression coverage for Arrow row safety and fixed-shape and ragged object-backed tensor materialization. |
| nemo_retriever/tests/test_pipeline_graph.py | Updates pipeline test doubles to isolate final dataset materialization through the shared conversion helper. |
Reviews (3): Last reviewed commit: "refactor: use native Ray batch iteration" | Re-trigger Greptile
edknv
approved these changes
Aug 18, 2026
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
Root cause
ray_dataset_to_pandas()forced every final dataset block throughiter_batches(batch_format="pyarrow"). After text splitting, structured content can live in a native pandas block asTensorDtype(object). Converting that block back to Arrow callspa.from_numpy_dtype(object)and raisesArrowNotImplementedError: Unsupported numpy type 17.The split had completed successfully; the crash occurred only while materializing the final SDK result. This fix keeps native block ownership at that boundary and avoids both the new pandas-to-Arrow failure and the sliced-Arrow row-access failure addressed by #2523.
Fixes NVBug 6628603.
Validation
multimodal_test.pdfbatch reproduction: extract returns 3 rows, split returns 9 rows, and row iteration succeedsuv run pytest -q tests/test_executor_arrow_pandas.py: 17 passedtest_batch_inline_text_matches_text_file: passedThis is intentionally a boundary-local fix. It does not mutate Ray
DataContext, add an operator-specific exception, or change the sticky pandas-output policy.