Repository navigation
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
[Medium impact] The PR appears safe to merge; no new actionable issues remain. SummaryAdds native PDF text fallback, optional longer retries for capped local pages, and Markdown table defaults for full-page Parse 3.5.
|
There was a problem hiding this comment.
Devin Review found 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Inline tables lost during fallback — Untagged native /v1/parse Markdown is now never replaced by the text layer, because its inline tables have no structured region to keep. A test covers a native Markdown table page.
- Distinct PDF lines dropped as duplicates — A line is now dropped only when every token occurs in the structured text, so 'Bonus 1 2 3 4' is kept next to a 'Base 1 2 3 4' table. A test covers this.
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
…alidate blank pages Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
…cument routing KV cache Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
…ilure Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
1d91591 to
38ce78f
Compare
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
…ndpoints The structured-line drop ignored single-digit tokens and matched words across all regions, so 'Revenue 9' was dropped when a table held 'Revenue 5'. A line is now dropped only when every token containing a digit also occurs in the structured text. Native /v1/parse callers omit the model name, so the text-layer fallback now also runs for native endpoints. Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
…text layer Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
| dropped = 0 | ||
| for line in native_text.splitlines(): | ||
| tokens = _RE_TOKEN.findall(line.lower()) | ||
| if tokens and all(token in structured_tokens for token in tokens): |
There was a problem hiding this comment.
[P2] Require a matching passage before dropping a native line
The single-digit fix does not resolve the remaining cross-row/cross-region match: structured_tokens is one set for every retained region, so co-occurrence anywhere is treated as duplication. Reproduced at this head: _drop_structured_lines("Sales 2024 100", ["Sales 2023 100", "Costs 2024 200"]) returns ("", 1), although neither table row contains the native fact "Sales 2024 100". When the default fallback activates, that fact disappears from both page text and ordered_page_text without an error. Match the normalized line against one actual passage/region, preserving label/value associations, or retain the native line when duplication cannot be established. Please extend the differing-values regression with this case; a page-wide token set is still too broad.
There was a problem hiding this comment.
Fixed in 7cc895e. _drop_structured_lines now splits structured text into rows (lines, plus HTML </tr> boundaries) and drops a native line only when all of its tokens occur within a single row. Sales 2024 100 is kept against rows Sales 2023 100 and Costs 2024 200, while a native line that duplicates one row is still dropped. New test: test_fallback_keeps_lines_matched_only_across_structured_rows.
…e-quality-guards Signed-off-by: Jacob Ioffe <jioffe@nvidia.com> # Conflicts: # nemo_retriever/src/nemo_retriever/models/local/nemotron_parse35.py # nemo_retriever/src/nemo_retriever/operators/extract/parse/nemotron_parse.py # nemo_retriever/tests/test_nemotron_parse35_vllm.py
…empty native responses Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
…e-quality-guards Signed-off-by: Jacob Ioffe <jioffe@nvidia.com> # Conflicts: # docs/docs/extraction/nemo-retriever-api-reference.md # nemo_retriever/src/nemo_retriever/operators/extract/parse/nemotron_parse.py
Description
Adds three quality guards to full-page Nemotron Parse 3.5 batch extraction. Each one targets a failure mode measured on bo10k (text retrieval) and the eight ViDoRe v3 subsets (image+text retrieval). All three are
ParseParamssettings and are on by default.text_layer_min_overlap0.3/v1/parseMarkdown is never replaced, since its tables are inline. The fallback also applies to native/v1/parseendpoints, which select the model server-side. Recordstext_source="text_layer"andtext_layer_lines_dropped.length_retry_max_tokens8192finish_reason="length"are rerun with this limit, unless their output tail compresses like a loop. The retry applies only when the first limit is lower. Recordslength_retry.table_format(full page)markdown(wasHTML)simple_html.NemotronParse35.invoke_batch_resultsgains an optional per-callmax_tokens(vLLM only), which the retry uses.Scope: batch full-page Parse 3.5 (
NemotronParseActor/nemotron_parse_pages) and the local vLLM adapter. The retry needs the local model. The text-layer fallback and markdown default apply to all Parse 3.5 paths.Unchanged: chart routing, the OCR pipeline, service/Helm, and remote endpoint request parameters.
Base: built on #2862. Until #2862 merges, this diff includes it.
Measurements
Offline A/B on saved Nemotron-3.5-Parse captures (picture-text prompt, temperature 0.2, repetition penalty 1.05, top-k 50,
max_tokens=4096). Page-level embeddings, dense top-10, no reranker. bo10k uses text; ViDoRe v3 (all 8 subsets, unweighted mean) uses text+image.On bo10k, repeated baseline runs vary by about .003. The fallback switched 2,946 of 213,538 bo10k pages and 467 of 19,252 ViDoRe pages. An empty-Picture crop pass was also measured and is left out because it gave no gain with the picture-text prompt.
End-to-end batch ingest of this branch on bo10k (213,538 pages, 2 GPUs, same settings and layout as the baseline,
max_tokens=4096):Page metadata: 0 failures, 2,918 pages used the text layer, 745 pages reran at 8,192 tokens, and length-capped pages fell from 1,664 to 983.
End-to-end on ViDoRe v3 (all 8 subsets, 19,252 pages, unweighted mean):
Page metadata: 0 failures, 467 pages used the text layer (all of the gain is in finance_fr), 62 pages reran at 8,192 tokens, and length-capped pages fell from 92 to 41.
Structured-line dedupe on fallback pages, measured offline on the same captures with the earlier 80%-word-coverage rule (fallback + markdown, without vs with dedupe). The current rule requires every token to match, so it drops a subset of those lines:
The end-to-end runs above predate the dedupe, the retry-failure handling, and the rebase onto the current #2862. Those changes do not alter successful-page Parse output, apart from the removal of duplicated lines on fallback pages.
Checklist
tests/test_nemotron_parse_quality_guards.py(19 tests) and a vLLMmax_tokensoverride test. Targeted Parse/params/chart-routing/runtime tests pass (477). Per-file full suite passes excepttest_nemotron_rerank_vl_v2_hf, which fails on a Hugging Face download, on the Batch local Parse 3.5 vLLM generation across pages and Ray UDF threads #2862 base too.ParseParamstable innemo-retriever-api-reference.md, incomplete-page guide introubleshoot.md).Link to Devin session: https://nvidia-cloud.devinenterprise.com/sessions/f1b18f26cd8b480b883b4fdd5fabab63
Open in Devin Desktop: https://nvidia-cloud.devinenterprise.com/desktop/session/f1b18f26cd8b480b883b4fdd5fabab63?variant=devin
Requested by: @jioffe502
🟢 Devin fixed all 2 findings · Follow Devin's work