fix: repair Ray Arrow-to-pandas batch ingestion - #2456
Merged
Conversation
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Contributor
Greptile SummaryThe PR repairs DataFrame contracts at Ray’s Arrow boundary and preserves Sidecar settings when VDB operators are reconstructed.
|
| Filename | Overview |
|---|---|
| nemo_retriever/src/nemo_retriever/graph/executor.py | Adds the shared Arrow-to-pandas conversion boundary and applies it to pandas-format Ray graph operators. |
| nemo_retriever/src/nemo_retriever/ingestor/branch_extraction.py | Moves branch-schema normalization to the safe pyarrow batch conversion path. |
| nemo_retriever/src/nemo_retriever/ingestor/graph_ingestor.py | Uses safe Arrow conversion for batch iteration and error-row extraction. |
| nemo_retriever/src/nemo_retriever/operators/extract/pdf/split.py | Routes PDF splitting through the shared Arrow-to-pandas boundary. |
| nemo_retriever/src/nemo_retriever/operators/vdb.py | Preserves original Sidecar-bearing VDB kwargs for graph reconstruction while retaining cleaned backend kwargs internally. |
| nemo_retriever/src/nemo_retriever/common/modality/content_transforms.py | Treats one-dimensional object NumPy arrays as extracted-content collections. |
| nemo_retriever/src/nemo_retriever/common/vdb/records.py | Converts array-backed bounding boxes into JSON-safe lists without ambiguous array truth testing. |
| nemo_retriever/tests/test_executor_arrow_pandas.py | Covers sliced nested Arrow batches, Ray conversion policy, pickled-object columns, numeric arrays, and multimodal content semantics. |
Sequence Diagram
sequenceDiagram
participant RD as Ray Dataset
participant Adapter as Arrow/Pandas Adapter
participant Op as NRL Operator
participant VDB as VDB Actor
RD->>Adapter: pyarrow.Table batch
Adapter->>Adapter: Compact vulnerable nested columns
Adapter->>Adapter: Ray BlockAccessor.to_pandas()
Adapter->>Adapter: Normalize pickled-object columns
Adapter->>Op: pandas.DataFrame
Op-->>RD: Processed batch
RD->>VDB: Global VDB batch
VDB->>VDB: Reconstruct with preserved Sidecar kwargs
VDB-->>RD: Persist records with Sidecar metadata
Reviews (7): Last reviewed commit: "Merge branch 'main' into jioffe502/fix-r..." | Re-trigger Greptile
Normalize Ray pickled-object extension columns before pandas row operations and retain sidecar settings when graph actors are reconstructed. Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
ChrisJar
approved these changes
Aug 12, 2026
edknv
approved these changes
Aug 12, 2026
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
…ted-arrow-pandas # Conflicts: # nemo_retriever/src/nemo_retriever/graph/executor.py # nemo_retriever/src/nemo_retriever/ingestor/branch_extraction.py
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
Fix the QA-reported SDK batch workflow for default element-granularity PDF ingestion with local embedding, Sidecar metadata, and LanceDB.
The fix stays at two existing production boundaries:
No planner, routing, harness, public API, dependency, or service behavior changes are included.
Root cause
The QA workflow exposed three consequences of losing DataFrame contracts across Ray boundaries:
Struct child array ... (1 < 2).(3, 0). Pandas row operations expected block shape(1, 3)and failed before the embedding model call.IngestVdbOperatorrecorded its graph constructor kwargs. Ray rebuilt the VDB actor withoutmeta_dataframe,meta_source_field, andmeta_fields, so rows were stored without the requested Sidecar fields.Fix
BlockAccessor.to_pandas()so Ray conversion policy remains authoritative.arrow_pickled_objectextension columns to ordinary pandasobjectcolumns before invoking the NRL operator.Validation
data/multimodal_test.pdf, batch mode, default element granularity, local vLLM embedder, in-memory Sidecar DataFrame, local LanceDB.category,department, andtimestamppersisted on every row.96531854: 3,220 passed, 23 skipped, 12 deselected, 41 subtests passed.git diff --check: passed.Artifacts are preserved under
/datasets/nv-ingest/qa-arrow-sidecar-2456/20260812-c5371840.Scope
Four files: the Ray executor boundary, VDB graph-constructor preservation, and focused regression tests. The broader graph-aware planner work in #2454 remains separate.