Skip to content

Release fixes: parse without nvcc, LanceDB failure paths, strict flags, infographic text, single PDF render - #2861

Closed
jioffe502 wants to merge 5 commits into
mainfrom
devin/1794864284-release-fixes
Closed

jioffe502 wants to merge 5 commits into
mainfrom
devin/1794864284-release-fixes

Conversation

@jioffe502

@jioffe502 jioffe502 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR combines five small release fixes into one review. Each fix is its own signed, DCO-signed commit, so you can review them one at a time. Each commit squashes the original PR exactly as it was. The only differences are context lines in #2839, because it sits on top of #2856's stage API-key routing.

Commit Original Why
c0321d5 #2857 Makes the native sampler the default for local vLLM. On hosts without nvcc, FlashInfer JIT used to fail and Parse quietly produced no output. Result: 1,940/1,940 pages parsed vs 0, engine startup 72s vs 739s, same pages/s.
16a687a #2830 Keeps actionable input error types from LanceDB stream batches. Also cleans up files left behind when a worker commit fails. Only failure paths change.
2b6d7f8 #2856 Flag combinations that were silently ignored now raise an error: fast-text conflicts, embed endpoint aliases, stage API keys, and method="audio". Release note included. Same rows and recall as main.
4710020 #2839 When infographic extraction is off (the default), keeps the text that sits inside infographic boxes. Titles inside infographics are kept too. bo10k: 9,940 → 9,981 docs indexed, recall@10 0.7484 → 0.7513, throughput about -0.9%. Checked against a real Page Elements NIM.
370e9b2 #2828 Renders each PDF page once, instead of again for image crops. PDF-extraction CPU about -5.7%, pages/s and recall flat.

Supersedes #2857, #2830, #2856, #2839 and #2828. The originals will be closed with a link here. #2834 is not included; it stays separate.

Validation:

  • Combined targeted suite: 560 passed. It covers every test file the five PRs changed, plus the operator, single-render and PDF crop/render tests.
  • pre-commit passed on all changed files.
  • mkdocs build --strict passed.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Link to Devin session: https://nvidia-cloud.devinenterprise.com/sessions/1a26768094554997905f04cfc7e6a53a
Open in Devin Desktop: https://nvidia-cloud.devinenterprise.com/desktop/session/1a26768094554997905f04cfc7e6a53a?variant=devin
Requested by: @jioffe502


👀 1 finding for you to triage · Follow Devin's work

Devin Review

#2857)

Squash the net release fixes from #2857.

Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…iled worker commits (#2830)

Squash the net release fixes from #2830.

Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ases, stage API keys, method=audio (#2856)

Squash the net release fixes from #2856.

Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…extraction is off (#2839)

Squash the net release fixes from #2839. Preserve stage-specific API key routing from #2856 alongside infographic extraction flags.

Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Squash the net release fixes from #2828.

Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 2/5

[Medium impact] The PR changes several bounded document-ingestion and local-inference workflows.

Fix the service key choice, preserve the crop function's positional arguments, and add the required types before merging.

Findings

  1. P1 Workers choose the wrong key ▶
  2. P1 Positional crop calls lose images ▶
  3. P1 New public options lack types ▶
Fix with agent prompt
### Issue 1
nemo_retriever/src/nemo_retriever/common/params/models.py:664-668
**Workers choose the wrong key.** When the service sets an explicit shared `api_key` while `NVIDIA_API_KEY` contains a different key, `_make_work_fn()` dumps the resolved stage keys into plain dictionaries. `_resolve_extract_params()` rebuilds them without `_api_key_env_defaulted`, so this check treats the environment-derived stage key as explicit.

Page-element detection now uses that key instead of the configured shared key, which can turn working service uploads into authentication failures. Preserve the key precedence across the worker round trip, and test that path with different shared and environment keys.

### Issue 2
nemo_retriever/src/nemo_retriever/common/api/util/pdf/pdfium.py:586-590
**Positional crop calls lose images.** The old second argument was `merge`. Adding `page_image` before it makes an existing call such as `extract_image_like_objects_from_pdfium_page(page, False)` pass a Boolean to `Image.fromarray()`. The exception is caught and the function returns no images.

Keep `merge` in its existing position and pass the new raster by keyword. The repository requires public API changes to preserve existing callers.

### Issue 3
nemo_retriever/src/nemo_retriever/models/nim/primitives/model_interface/yolox.py:1592
**New public options lack types.** The new `suppress_text_in_infographics` argument has no type annotation here or in `postprocess_included_texts()`. The new `match_infographics` argument in `match_structured_boxes_with_title()` has the same gap.

The repository requires type annotations on all public parameters. Add `bool` annotations to these new options so callers and type checkers can see their expected values.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR updates local model startup, LanceDB failure cleanup, extraction settings, infographic text retention, and PDF rendering.

  • Local vLLM engines use the native sampler by default.
  • LanceDB stream writes preserve the type of input errors.
  • Failed LanceDB worker writes remove files that were not committed.
  • Fast-text ingest requests reject extraction options they cannot use.
  • Audio inputs use the dedicated audio extraction path.
  • Embedding endpoint aliases must agree when both are set.
  • Remote extraction stages use their own key or the shared key.
  • Page text keeps words inside infographics when infographic extraction is off.
  • PDF extraction reuses each page render for image crops.
  • The examples drop an explicit text-depth setting.

jioffe502 explicitly intends the stricter flag checks and removal of method="audio"; audio callers should use GraphIngestor.extract_audio().

The review found a service credential regression, a broken positional argument, and missing types on new public options. Tests were not run.

Reviews (1) · Last reviewed commit: "Render each PDF page once in pdf_extract..." · Reviewed by Greptile

Comment on lines +664 to +668
and self._api_key_was_env_defaulted(field_name)
and not self._api_key_was_env_defaulted("api_key")
):
return self.api_key
return stage_key or self.api_key

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Workers choose the wrong key. When the service sets an explicit shared api_key while NVIDIA_API_KEY contains a different key, _make_work_fn() dumps the resolved stage keys into plain dictionaries. _resolve_extract_params() rebuilds them without _api_key_env_defaulted, so this check treats the environment-derived stage key as explicit.

Page-element detection now uses that key instead of the configured shared key, which can turn working service uploads into authentication failures. Preserve the key precedence across the worker round trip, and test that path with different shared and environment keys.

Prompt To Fix With AI
This is a comment left during a code review.
Path: nemo_retriever/src/nemo_retriever/common/params/models.py
Line: 664-668

Comment:
**Workers choose the wrong key.** When the service sets an explicit shared `api_key` while `NVIDIA_API_KEY` contains a different key, `_make_work_fn()` dumps the resolved stage keys into plain dictionaries. `_resolve_extract_params()` rebuilds them without `_api_key_env_defaulted`, so this check treats the environment-derived stage key as explicit.

Page-element detection now uses that key instead of the configured shared key, which can turn working service uploads into authentication failures. Preserve the key precedence across the worker round trip, and test that path with different shared and environment keys.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +586 to +590
def extract_image_like_objects_from_pdfium_page(
page: pdfium.PdfPage,
page_image: Optional[np.ndarray] = None,
merge: bool = True,
**kwargs: Any,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Positional crop calls lose images. The old second argument was merge. Adding page_image before it makes an existing call such as extract_image_like_objects_from_pdfium_page(page, False) pass a Boolean to Image.fromarray(). The exception is caught and the function returns no images.

Keep merge in its existing position and pass the new raster by keyword. The repository requires public API changes to preserve existing callers.

Rule Used: Changes to public API surfaces (FastAPI endpoints, client library methods, CLI arguments, Pydantic models in api/) must maintain backward compatibility. Breaking changes require deprecation warnings, version bumps, and migration documentation. Flag a... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: nemo_retriever/src/nemo_retriever/common/api/util/pdf/pdfium.py
Line: 586-590

Comment:
**Positional crop calls lose images.** The old second argument was `merge`. Adding `page_image` before it makes an existing call such as `extract_image_like_objects_from_pdfium_page(page, False)` pass a Boolean to `Image.fromarray()`. The exception is caught and the function returns no images.

Keep `merge` in its existing position and pass the new raster by keyword. The repository requires public API changes to preserve existing callers.

**Rule Used:** Changes to public API surfaces (FastAPI endpoints, client library methods, CLI arguments, Pydantic models in api/) must maintain backward compatibility. Breaking changes require deprecation warnings, version bumps, and migration documentation. Flag a... ([source](https://github.com/nvidia/nemo-retriever/blob/370e9b217f5d65944c407031e2ccfec3429d46cb/.greptile/config.json))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

confs,
class_="title",
classes=["table", "chart", "title", "infographic"],
suppress_text_in_infographics=True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 New public options lack types. The new suppress_text_in_infographics argument has no type annotation here or in postprocess_included_texts(). The new match_infographics argument in match_structured_boxes_with_title() has the same gap.

The repository requires type annotations on all public parameters. Add bool annotations to these new options so callers and type checkers can see their expected values.

Rule Used: All public functions, methods, and class attributes must have type annotations. This includes parameter types, return types, and class-level attributes. Private/internal helpers (prefixed with _) are encouraged but not required. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: nemo_retriever/src/nemo_retriever/models/nim/primitives/model_interface/yolox.py
Line: 1592

Comment:
**New public options lack types.** The new `suppress_text_in_infographics` argument has no type annotation here or in `postprocess_included_texts()`. The new `match_infographics` argument in `match_structured_boxes_with_title()` has the same gap.

The repository requires type annotations on all public parameters. Add `bool` annotations to these new options so callers and type checkers can see their expected values.

**Rule Used:** All public functions, methods, and class attributes must have type annotations. This includes parameter types, return types, and class-level attributes. Private/internal helpers (prefixed with _) are encouraged but not required. ([source](https://github.com/nvidia/nemo-retriever/blob/370e9b217f5d65944c407031e2ccfec3429d46cb/.greptile/config.json))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 finding. It is left for you to triage below.

View findings in Devin Review · Follow Devin's work

Devin Review

Comment on lines +664 to +665
and self._api_key_was_env_defaulted(field_name)
and not self._api_key_was_env_defaulted("api_key")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Saved graphs lose credential precedence

For environment-defaulted stage keys, stage_api_key loses an explicit shared key's precedence after graph reload. The credential serializer converts automatic defaults into explicit references, erasing their defaulted status. Auto-dispatched page-element extraction can then fail authentication.

Devin left this for you to triage: This only happens with a saved and reloaded graph where both a NVIDIA_API_KEY/NGC_API_KEY env var and a different explicit shared api_key are set. In that case the stage could use the env key. This is a narrow edge case, so I recommend shipping as-is and fixing in the graph credential serializer after the release if it matters.

Learn more

The new precedence rule depends on private provenance that the graph codec does not preserve. The credential serializer writes both explicit references and automatically resolved defaults as environment references. The model decoder reconstructs the params from those references. Reconstruction treats each reference as explicit and leaves _api_key_env_defaulted empty. The auto-dispatch graph retains the params object, so its page-element credential selection occurs after reconstruction.

Example: Set NVIDIA_API_KEY=default-key and SHARED_KEY=shared-key. Build an auto-dispatch graph with ExtractParams(api_key="os.environ/SHARED_KEY"). Page-element detection selects shared-key before saving, but selects default-key after loading the graph with the same environment.

Recommended fix: Preserve automatic-versus-explicit credential provenance through the graph codec, or serialize automatically defaulted stage fields in a form that reconstructs their fallback semantics. Retain explicitly supplied stage references. Add a save/load regression covering an explicit shared environment reference alongside automatically populated stage keys.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Closing: the release fixes will be reviewed as the individual PRs #2857, #2830, #2856, #2839 and #2828, which are reopened.

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