From ae11a50fae3cb998f740762501326dda28c308da Mon Sep 17 00:00:00 2001 From: Kurt Heiss Date: Fri, 27 Mar 2026 12:01:35 -0700 Subject: [PATCH] Updating files per bugs 5966185, 5966211, and 5966281 --- docs/docs/extraction/nv-ingest-python-api.md | 4 +- docs/docs/extraction/python-api-reference.md | 4 +- docs/docs/extraction/quickstart-guide.md | 2 +- .../extraction/quickstart-library-mode.md | 37 +++++++++++++++++++ docs/docs/extraction/v2-api-guide.md | 5 ++- 5 files changed, 45 insertions(+), 7 deletions(-) diff --git a/docs/docs/extraction/nv-ingest-python-api.md b/docs/docs/extraction/nv-ingest-python-api.md index 106bdf76d7..c3fa485e91 100644 --- a/docs/docs/extraction/nv-ingest-python-api.md +++ b/docs/docs/extraction/nv-ingest-python-api.md @@ -372,7 +372,7 @@ You can use this to generate descriptions of unstructured images, infographics, !!! note - To use the `caption` option, enable the `vlm` profile when you start the NeMo Retriever Library services. The default model used by `caption` is `nvidia/llama-3.1-nemotron-nano-vl-8b-v1`. For more information, refer to [Profile Information in the Quickstart Guide](quickstart-guide.md#profile-information). + To use the `caption` option, enable the `vlm` profile when you start the NeMo Retriever Library services. The default model used by `caption` is `nvidia/nemotron-nano-12b-v2-vl`. For more information, refer to [Profile Information in the Quickstart Guide](quickstart-guide.md#profile-information). ### Basic Usage @@ -389,7 +389,7 @@ To specify a different API endpoint, pass additional parameters to `caption`. ```python ingestor = ingestor.caption( endpoint_url="https://integrate.api.nvidia.com/v1/chat/completions", - model_name="nvidia/llama-3.1-nemotron-nano-vl-8b-v1", + model_name="nvidia/nemotron-nano-12b-v2-vl", api_key="nvapi-" ) ``` diff --git a/docs/docs/extraction/python-api-reference.md b/docs/docs/extraction/python-api-reference.md index 7feb020f1e..2ec6e7adf4 100644 --- a/docs/docs/extraction/python-api-reference.md +++ b/docs/docs/extraction/python-api-reference.md @@ -464,7 +464,7 @@ You can use this to generate descriptions of unstructured images, infographics, !!! note - To use the `caption` option, enable the `vlm` profile when you start the NeMo Retriever Library services. The default model used by `caption` is `nvidia/llama-3.1-nemotron-nano-vl-8b-v1`. For more information, refer to [Profile Information in the Quickstart Guide](quickstart-guide.md#profile-information). + To use the `caption` option, enable the `vlm` profile when you start the NeMo Retriever Library services. The default model used by `caption` is `nvidia/nemotron-nano-12b-v2-vl`. For more information, refer to [Profile Information in the Quickstart Guide](quickstart-guide.md#profile-information). ### Basic Usage @@ -481,7 +481,7 @@ To specify a different API endpoint, pass additional parameters to `caption`. ```python ingestor = ingestor.caption( endpoint_url="https://integrate.api.nvidia.com/v1/chat/completions", - model_name="nvidia/llama-3.1-nemotron-nano-vl-8b-v1", + model_name="nvidia/nemotron-nano-12b-v2-vl", api_key="nvapi-" ) ``` diff --git a/docs/docs/extraction/quickstart-guide.md b/docs/docs/extraction/quickstart-guide.md index 1c03d0b03f..d16b15fd7b 100644 --- a/docs/docs/extraction/quickstart-guide.md +++ b/docs/docs/extraction/quickstart-guide.md @@ -395,7 +395,7 @@ You can specify multiple `--profile` options. | `retrieval` | Core | Enables the embedding NIM and (optional) GPU-accelerated Milvus. Omit this profile to use the default LanceDB backend. | | `audio` | Advanced | Use [Riva](https://docs.nvidia.com/deeplearning/riva/user-guide/docs/index.html) for processing audio files. For more information, refer to [Audio Processing](audio.md). | | `nemotron-parse` | Advanced | Use [nemotron-parse](https://build.nvidia.com/nvidia/nemotron-parse), which adds state-of-the-art text and table extraction. For more information, refer to [Advanced Visual Parsing](nemoretriever-parse.md). | -| `vlm` | Advanced | Use [llama 3.1 Nemotron 8B Vision](https://build.nvidia.com/nvidia/llama-3.1-nemotron-nano-vl-8b-v1/modelcard) for image captioning of unstructured images and infographics. This profile enables the `caption` method in the Python API to generate text descriptions of visual content. For more information, refer to [Use Multimodal Embedding](vlm-embed.md) and [Extract Captions from Images](nv-ingest-python-api.md#extract-captions-from-images). | +| `vlm` | Advanced | Use [Nemotron Nano 12B v2 VL](https://build.nvidia.com/nvidia/nemotron-nano-12b-v2-vl/modelcard) for image captioning of unstructured images and infographics. This profile enables the `caption` method in the Python API to generate text descriptions of visual content. For more information, refer to [Use Multimodal Embedding](vlm-embed.md) and [Extract Captions from Images](nv-ingest-python-api.md#extract-captions-from-images). | ### Example: Using the VLM Profile for Infographic Captioning diff --git a/docs/docs/extraction/quickstart-library-mode.md b/docs/docs/extraction/quickstart-library-mode.md index 32f69d7145..d86a1b9d0f 100644 --- a/docs/docs/extraction/quickstart-library-mode.md +++ b/docs/docs/extraction/quickstart-library-mode.md @@ -5,3 +5,40 @@ NVIDIA Ingest (nv-ingest) has been renamed NeMo Retriever Library. Use the [Quick Start for NeMo Retriever Library](https://github.com/NVIDIA/NeMo-Retriever/blob/26.03/nemo_retriever/README.md) to set up and run the NeMo Retriever Library locally, so you can build a GPU‑accelerated, multimodal RAG ingestion pipeline that parses PDFs, HTML, text, audio, and video into LanceDB vector embeddings, integrates with Nemotron RAG models (locally or via NIM endpoints), which includes Ray‑based scaling with built‑in recall evaluation. Python 3.12 or later is required (see [Prerequisites](prerequisites.md)). + +## `run_pipeline` + +The primary Python entry point for launching the Ray-based ingestion pipeline in library mode is `run_pipeline` in `nv_ingest.framework.orchestration.ray.util.pipeline.pipeline_runners`. + +```python +from nv_ingest.framework.orchestration.ray.util.pipeline.pipeline_runners import run_pipeline +``` + +### Parameters + +The following table matches the function signature in source (defaults and optionality). **None of these parameters are required** in the sense of having no default; omit them to use the defaults shown. + +| Parameter | Required | Type (default) | Description | +|-----------|----------|----------------|-------------| +| `pipeline_config` | No | `Optional[PipelineConfigSchema]` (`None`) | Validated pipeline configuration. If `None` and `libmode=True`, the default library-mode pipeline is loaded automatically. If `None` and `libmode=False`, a `ValueError` is raised—you must pass a configuration. | +| `block` | No | `bool` (`True`) | If `True`, the call blocks until the pipeline finishes. If `False`, returns immediately with a handle object (see [Return type](#return-type)). | +| `disable_dynamic_scaling` | No | `Optional[bool]` (`None`) | If set, overrides the same field from the pipeline configuration. | +| `dynamic_memory_threshold` | No | `Optional[float]` (`None`) | If set, overrides the same field from the pipeline configuration. | +| `run_in_subprocess` | No | `bool` (`False`) | If `True`, runs the pipeline in a separate Python subprocess (`multiprocessing.Process`). If `False`, runs in the current process. | +| `stdout` | No | `Optional[TextIO]` (`None`) | When using a subprocess, optional stream for child stdout; if `None`, stdout is discarded. | +| `stderr` | No | `Optional[TextIO]` (`None`) | When using a subprocess, optional stream for child stderr; if `None`, stderr is discarded. | +| `libmode` | No | `bool` (`True`) | If `True` and `pipeline_config` is `None`, loads the default library-mode pipeline. If `False`, `pipeline_config` must be provided. | +| `quiet` | No | `Optional[bool]` (`None`) | If `True`, reduces logging noise for library use. If `None`, defaults to `True` when `libmode=True`. | + +### Return type + +`run_pipeline` returns a **union** of three possible types, depending on `block` and `run_in_subprocess`: + +| Mode | Return type | Notes | +|------|-------------|--------| +| In-process, `block=True` | `float` | Elapsed time in seconds. | +| In-process, `block=False` | `RayPipelineInterface` | Handle to control the in-process pipeline (defined in `nv_ingest.framework.orchestration.ray.primitives.ray_pipeline`). | +| Subprocess, `block=False` | `RayPipelineSubprocessInterface` | Handle to control the subprocess-based pipeline (same module). **This is not** `RayPipelineInterface`; the two classes are separate implementations of `PipelineInterface`. Use `isinstance(..., RayPipelineSubprocessInterface)` when you launch with `run_in_subprocess=True` and `block=False`. | +| Subprocess, `block=True` | `float` | Returns `0.0` when blocking in subprocess mode. | + +For the authoritative contract (including raised exceptions), refer to the docstring on `run_pipeline` in `src/nv_ingest/framework/orchestration/ray/util/pipeline/pipeline_runners.py`. diff --git a/docs/docs/extraction/v2-api-guide.md b/docs/docs/extraction/v2-api-guide.md index 5aa87f1f62..a51152f412 100644 --- a/docs/docs/extraction/v2-api-guide.md +++ b/docs/docs/extraction/v2-api-guide.md @@ -42,9 +42,10 @@ ingestor = Ingestor( results = ingestor.files(["large_document.pdf"]) \ .extract(extract_text=True, extract_tables=True) \ .pdf_split_config(pages_per_chunk=64) \ # ← Step 2: Configure splitting - .ingest() + .ingest(return_full_response=True) # Full HTTP-style envelope per job (includes metadata) -print(f"Processed {results['metadata']['total_pages']} pages") +# ingest() returns a list with one entry per input file. Top-level metadata (e.g. total_pages) is only present when return_full_response=True. +print(f"Processed {results[0]['metadata']['total_pages']} pages") ``` ### CLI Usage