nv-ingest 2025.8.4.dev20250804__py3-none-any.whl → 2025.12.10.dev20251210__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. nv_ingest/api/__init__.py +6 -0
  2. nv_ingest/api/main.py +2 -0
  3. nv_ingest/api/tracing.py +82 -0
  4. nv_ingest/api/v2/README.md +203 -0
  5. nv_ingest/api/v2/__init__.py +3 -0
  6. nv_ingest/api/v2/ingest.py +1300 -0
  7. nv_ingest/framework/orchestration/execution/__init__.py +3 -0
  8. nv_ingest/framework/orchestration/execution/helpers.py +85 -0
  9. nv_ingest/framework/orchestration/execution/options.py +112 -0
  10. nv_ingest/framework/orchestration/process/__init__.py +3 -0
  11. nv_ingest/framework/orchestration/process/dependent_services.py +84 -0
  12. nv_ingest/framework/orchestration/process/execution.py +495 -0
  13. nv_ingest/framework/orchestration/process/lifecycle.py +214 -0
  14. nv_ingest/framework/orchestration/process/strategies.py +218 -0
  15. nv_ingest/framework/orchestration/process/termination.py +147 -0
  16. nv_ingest/framework/orchestration/ray/examples/pipeline_test_harness.py +3 -3
  17. nv_ingest/framework/orchestration/ray/primitives/pipeline_topology.py +4 -4
  18. nv_ingest/framework/orchestration/ray/primitives/ray_pipeline.py +32 -38
  19. nv_ingest/framework/orchestration/ray/primitives/ray_stat_collector.py +5 -5
  20. nv_ingest/framework/orchestration/ray/stages/extractors/audio_extractor.py +10 -7
  21. nv_ingest/framework/orchestration/ray/stages/extractors/chart_extractor.py +17 -14
  22. nv_ingest/framework/orchestration/ray/stages/extractors/docx_extractor.py +11 -6
  23. nv_ingest/framework/orchestration/ray/stages/extractors/html_extractor.py +10 -5
  24. nv_ingest/framework/orchestration/ray/stages/extractors/image_extractor.py +12 -7
  25. nv_ingest/framework/orchestration/ray/stages/extractors/infographic_extractor.py +22 -10
  26. nv_ingest/framework/orchestration/ray/stages/extractors/ocr_extractor.py +71 -0
  27. nv_ingest/framework/orchestration/ray/stages/extractors/pdf_extractor.py +19 -15
  28. nv_ingest/framework/orchestration/ray/stages/extractors/pptx_extractor.py +10 -5
  29. nv_ingest/framework/orchestration/ray/stages/extractors/table_extractor.py +16 -14
  30. nv_ingest/framework/orchestration/ray/stages/injectors/metadata_injector.py +16 -13
  31. nv_ingest/framework/orchestration/ray/stages/meta/ray_actor_sink_stage_base.py +3 -0
  32. nv_ingest/framework/orchestration/ray/stages/meta/ray_actor_source_stage_base.py +3 -3
  33. nv_ingest/framework/orchestration/ray/stages/meta/ray_actor_stage_base.py +92 -4
  34. nv_ingest/framework/orchestration/ray/stages/mutate/image_dedup.py +12 -8
  35. nv_ingest/framework/orchestration/ray/stages/mutate/image_filter.py +12 -9
  36. nv_ingest/framework/orchestration/ray/stages/sinks/default_drain.py +4 -4
  37. nv_ingest/framework/orchestration/ray/stages/sinks/message_broker_task_sink.py +5 -2
  38. nv_ingest/framework/orchestration/ray/stages/sources/message_broker_task_source.py +116 -69
  39. nv_ingest/framework/orchestration/ray/stages/storage/image_storage.py +79 -11
  40. nv_ingest/framework/orchestration/ray/stages/storage/store_embeddings.py +10 -5
  41. nv_ingest/framework/orchestration/ray/stages/telemetry/job_counter.py +8 -4
  42. nv_ingest/framework/orchestration/ray/stages/telemetry/otel_tracer.py +17 -7
  43. nv_ingest/framework/orchestration/ray/stages/transforms/image_caption.py +12 -6
  44. nv_ingest/framework/orchestration/ray/stages/transforms/text_embed.py +17 -18
  45. nv_ingest/framework/orchestration/ray/stages/transforms/text_splitter.py +21 -14
  46. nv_ingest/framework/orchestration/ray/stages/utility/throughput_monitor.py +11 -3
  47. nv_ingest/framework/orchestration/ray/util/pipeline/pid_controller.py +1 -2
  48. nv_ingest/framework/orchestration/ray/util/pipeline/pipeline_runners.py +33 -326
  49. nv_ingest/framework/orchestration/ray/util/pipeline/tools.py +13 -3
  50. nv_ingest/framework/util/flow_control/udf_intercept.py +352 -0
  51. nv_ingest/framework/util/service/impl/ingest/redis_ingest_service.py +215 -11
  52. nv_ingest/pipeline/__init__.py +3 -0
  53. nv_ingest/pipeline/config/__init__.py +3 -0
  54. nv_ingest/pipeline/config/loaders.py +229 -0
  55. nv_ingest/pipeline/config/replica_resolver.py +237 -0
  56. nv_ingest/pipeline/default_libmode_pipeline_impl.py +528 -0
  57. nv_ingest/pipeline/default_pipeline_impl.py +557 -0
  58. nv_ingest/pipeline/ingest_pipeline.py +389 -0
  59. nv_ingest/pipeline/pipeline_schema.py +398 -0
  60. {nv_ingest-2025.8.4.dev20250804.dist-info → nv_ingest-2025.12.10.dev20251210.dist-info}/METADATA +6 -3
  61. {nv_ingest-2025.8.4.dev20250804.dist-info → nv_ingest-2025.12.10.dev20251210.dist-info}/RECORD +64 -43
  62. nv_ingest/framework/orchestration/ray/util/pipeline/pipeline_builders.py +0 -359
  63. nv_ingest/framework/orchestration/ray/util/pipeline/stage_builders.py +0 -649
  64. {nv_ingest-2025.8.4.dev20250804.dist-info → nv_ingest-2025.12.10.dev20251210.dist-info}/WHEEL +0 -0
  65. {nv_ingest-2025.8.4.dev20250804.dist-info → nv_ingest-2025.12.10.dev20251210.dist-info}/licenses/LICENSE +0 -0
  66. {nv_ingest-2025.8.4.dev20250804.dist-info → nv_ingest-2025.12.10.dev20251210.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,528 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-25, NVIDIA CORPORATION & AFFILIATES.
2
+ # All rights reserved.
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ # noqa
6
+ # flake8: noqa
7
+ # pylint: disable=line-too-long
8
+
9
+ """
10
+ Default pipeline implementation for libmode.
11
+
12
+ This module contains the default libmode pipeline configuration as a string,
13
+ allowing the pipeline to be loaded without requiring external YAML files.
14
+ """
15
+
16
+ DEFAULT_LIBMODE_PIPELINE_YAML = """# Default Ingestion Pipeline Configuration for Library Mode
17
+ # This file replicates the static pipeline defined in pipeline_builders.py
18
+
19
+ name: "NVIngest default libmode pipeline"
20
+ description: "This is the default ingestion pipeline for NVIngest in library mode"
21
+ stages:
22
+ # Source
23
+ - name: "source_stage"
24
+ type: "source"
25
+ phase: 0 # PRE_PROCESSING
26
+ actor: "nv_ingest.framework.orchestration.ray.stages.sources.message_broker_task_source:MessageBrokerTaskSourceStage"
27
+ config:
28
+ broker_client:
29
+ client_type: "simple"
30
+ host: $MESSAGE_CLIENT_HOST|"0.0.0.0"
31
+ port: $MESSAGE_CLIENT_PORT|7671
32
+ task_queue: "ingest_task_queue"
33
+ poll_interval: 0.1
34
+ replicas:
35
+ min_replicas: 1
36
+ max_replicas:
37
+ strategy: "static"
38
+ value: 1
39
+ static_replicas:
40
+ strategy: "static"
41
+ value: 1
42
+ runs_after: []
43
+
44
+ # Pre-processing
45
+ - name: "metadata_injector"
46
+ type: "stage"
47
+ phase: 0 # PRE_PROCESSING
48
+ actor: "nv_ingest.framework.orchestration.ray.stages.injectors.metadata_injector:MetadataInjectionStage"
49
+ config: {}
50
+ replicas:
51
+ min_replicas: 0
52
+ max_replicas:
53
+ strategy: "static"
54
+ value: 1
55
+ static_replicas:
56
+ strategy: "static"
57
+ value: 1
58
+ runs_after:
59
+ - "source_stage"
60
+
61
+ # Primitive Extraction
62
+ - name: "pdf_extractor"
63
+ type: "stage"
64
+ phase: 1 # EXTRACTION
65
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.pdf_extractor:PDFExtractorStage"
66
+ config:
67
+ pdfium_config:
68
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
69
+ yolox_endpoints: [
70
+ $YOLOX_GRPC_ENDPOINT|"",
71
+ $YOLOX_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-page-elements-v2"
72
+ ]
73
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|http
74
+ nemoretriever_parse_config:
75
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
76
+ nemoretriever_parse_endpoints: [
77
+ $NEMORETRIEVER_PARSE_GRPC_ENDPOINT|"",
78
+ $NEMORETRIEVER_PARSE_HTTP_ENDPOINT|"https://integrate.api.nvidia.com/v1/chat/completions"
79
+ ]
80
+ nemoretriever_parse_infer_protocol: $NEMORETRIEVER_PARSE_INFER_PROTOCOL|http
81
+ nemoretriever_parse_model_name: $NEMORETRIEVER_PARSE_MODEL_NAME|"nvidia/nemoretriever-parse"
82
+ yolox_endpoints: [
83
+ $YOLOX_GRPC_ENDPOINT|"",
84
+ $YOLOX_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-page-elements-v2"
85
+ ]
86
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|http
87
+ replicas:
88
+ min_replicas: 0
89
+ max_replicas:
90
+ strategy: "memory_thresholding"
91
+ memory_per_replica_mb: 10000 # Heuristic max consumption
92
+ static_replicas:
93
+ strategy: "memory_static_global_percent"
94
+ memory_per_replica_mb: 10000
95
+ limit: 16
96
+
97
+ - name: "audio_extractor"
98
+ type: "stage"
99
+ phase: 1 # EXTRACTION
100
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.audio_extractor:AudioExtractorStage"
101
+ config:
102
+ audio_extraction_config:
103
+ audio_endpoints: [
104
+ $AUDIO_GRPC_ENDPOINT|"grpc.nvcf.nvidia.com:443",
105
+ $AUDIO_HTTP_ENDPOINT|""
106
+ ]
107
+ function_id: $AUDIO_FUNCTION_ID|"1598d209-5e27-4d3c-8079-4751568b1081"
108
+ audio_infer_protocol: $AUDIO_INFER_PROTOCOL|grpc
109
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
110
+ replicas:
111
+ min_replicas: 0
112
+ max_replicas:
113
+ strategy: "static"
114
+ value: 2
115
+ static_replicas:
116
+ strategy: "static"
117
+ value: 2
118
+
119
+ - name: "docx_extractor"
120
+ type: "stage"
121
+ phase: 1 # EXTRACTION
122
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.docx_extractor:DocxExtractorStage"
123
+ config:
124
+ docx_extraction_config:
125
+ yolox_endpoints: [
126
+ $YOLOX_GRPC_ENDPOINT|"",
127
+ $YOLOX_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-page-elements-v2"
128
+ ]
129
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|http
130
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
131
+ pdfium_config:
132
+ yolox_endpoints: [
133
+ $YOLOX_GRPC_ENDPOINT|"",
134
+ $YOLOX_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-page-elements-v2"
135
+ ]
136
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|http
137
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
138
+ replicas:
139
+ min_replicas: 0
140
+ max_replicas:
141
+ strategy: "static"
142
+ value: 2
143
+ static_replicas:
144
+ strategy: "static"
145
+ value: 1
146
+
147
+ - name: "pptx_extractor"
148
+ type: "stage"
149
+ phase: 1 # EXTRACTION
150
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.pptx_extractor:PPTXExtractorStage"
151
+ config:
152
+ pptx_extraction_config:
153
+ yolox_endpoints: [
154
+ $YOLOX_GRPC_ENDPOINT|"",
155
+ $YOLOX_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-page-elements-v2"
156
+ ]
157
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|http
158
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
159
+ pdfium_config:
160
+ yolox_endpoints: [
161
+ $YOLOX_GRPC_ENDPOINT|"",
162
+ $YOLOX_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-page-elements-v2"
163
+ ]
164
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|http
165
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
166
+ replicas:
167
+ min_replicas: 0
168
+ max_replicas:
169
+ strategy: "static"
170
+ value: 2
171
+ static_replicas:
172
+ strategy: "static"
173
+ value: 1
174
+
175
+ - name: "image_extractor"
176
+ type: "stage"
177
+ phase: 1 # EXTRACTION
178
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.image_extractor:ImageExtractorStage"
179
+ config:
180
+ image_extraction_config:
181
+ yolox_endpoints: [
182
+ $YOLOX_GRPC_ENDPOINT|"",
183
+ $YOLOX_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-page-elements-v2"
184
+ ]
185
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|http
186
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
187
+ replicas:
188
+ min_replicas: 0
189
+ max_replicas:
190
+ strategy: "static"
191
+ value: 2
192
+ static_replicas:
193
+ strategy: "static"
194
+ value: 1
195
+
196
+ - name: "html_extractor"
197
+ type: "stage"
198
+ phase: 1 # EXTRACTION
199
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.html_extractor:HtmlExtractorStage"
200
+ config: {}
201
+ replicas:
202
+ min_replicas: 0
203
+ max_replicas:
204
+ strategy: "static"
205
+ value: 2
206
+ static_replicas:
207
+ strategy: "static"
208
+ value: 1
209
+
210
+ - name: "infographic_extractor"
211
+ type: "stage"
212
+ phase: 1 # EXTRACTION
213
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.infographic_extractor:InfographicExtractorStage"
214
+ config:
215
+ endpoint_config:
216
+ ocr_endpoints: [
217
+ $OCR_GRPC_ENDPOINT|"",
218
+ $OCR_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-ocr-v1"
219
+ ]
220
+ ocr_infer_protocol: $OCR_INFER_PROTOCOL|"http"
221
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
222
+ replicas:
223
+ min_replicas: 0
224
+ max_replicas:
225
+ strategy: "static"
226
+ value: 2
227
+ static_replicas:
228
+ strategy: "static"
229
+ value: 1
230
+
231
+ - name: "table_extractor"
232
+ type: "stage"
233
+ phase: 1 # EXTRACTION
234
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.table_extractor:TableExtractorStage"
235
+ config:
236
+ endpoint_config:
237
+ yolox_endpoints: [
238
+ $YOLOX_TABLE_STRUCTURE_GRPC_ENDPOINT|"",
239
+ $YOLOX_TABLE_STRUCTURE_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-table-structure-v1"
240
+ ]
241
+ yolox_infer_protocol: $YOLOX_TABLE_STRUCTURE_INFER_PROTOCOL|"http"
242
+ ocr_endpoints: [
243
+ $OCR_GRPC_ENDPOINT|"",
244
+ $OCR_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-ocr-v1"
245
+ ]
246
+ ocr_infer_protocol: $PADDLE_INFER_PROTOCOL|"http"
247
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
248
+ replicas:
249
+ min_replicas: 0
250
+ max_replicas:
251
+ strategy: "memory_thresholding"
252
+ memory_per_replica_mb: 10000
253
+ static_replicas:
254
+ strategy: "memory_static_global_percent"
255
+ memory_per_replica_mb: 10000
256
+ limit: 6
257
+
258
+ - name: "chart_extractor"
259
+ type: "stage"
260
+ phase: 1 # EXTRACTION
261
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.chart_extractor:ChartExtractorStage"
262
+ config:
263
+ endpoint_config:
264
+ yolox_endpoints: [
265
+ $YOLOX_GRAPHIC_ELEMENTS_GRPC_ENDPOINT|"",
266
+ $YOLOX_GRAPHIC_ELEMENTS_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-graphic-elements-v1"
267
+ ]
268
+ yolox_infer_protocol: $YOLOX_GRAPHIC_ELEMENTS_INFER_PROTOCOL|"http"
269
+ ocr_endpoints: [
270
+ $OCR_GRPC_ENDPOINT|"",
271
+ $OCR_HTTP_ENDPOINT|"https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-ocr-v1"
272
+ ]
273
+ ocr_infer_protocol: $OCR_INFER_PROTOCOL|"http"
274
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
275
+ replicas:
276
+ min_replicas: 0
277
+ max_replicas:
278
+ strategy: "memory_thresholding"
279
+ memory_per_replica_mb: 10000
280
+ static_replicas:
281
+ strategy: "memory_static_global_percent"
282
+ memory_per_replica_mb: 10000
283
+ limit: 6
284
+
285
+ # Post-processing / Mutators
286
+ - name: "image_filter"
287
+ type: "stage"
288
+ phase: 3 # MUTATION
289
+ actor: "nv_ingest.framework.orchestration.ray.stages.mutate.image_filter:ImageFilterStage"
290
+ replicas:
291
+ min_replicas: 0
292
+ max_replicas:
293
+ strategy: "static"
294
+ value: 1
295
+ static_replicas:
296
+ strategy: "static"
297
+ value: 1
298
+
299
+ - name: "image_dedup"
300
+ type: "stage"
301
+ phase: 3 # MUTATION
302
+ actor: "nv_ingest.framework.orchestration.ray.stages.mutate.image_dedup:ImageDedupStage"
303
+ replicas:
304
+ min_replicas: 0
305
+ max_replicas:
306
+ strategy: "static"
307
+ value: 1
308
+ static_replicas:
309
+ strategy: "static"
310
+ value: 1
311
+
312
+ - name: "text_splitter"
313
+ type: "stage"
314
+ phase: 3 # MUTATION
315
+ actor: "nv_ingest.framework.orchestration.ray.stages.transforms.text_splitter:TextSplitterStage"
316
+ config:
317
+ chunk_size: 512
318
+ chunk_overlap: 20
319
+ replicas:
320
+ min_replicas: 0
321
+ max_replicas:
322
+ strategy: "static"
323
+ value: 3
324
+ static_replicas:
325
+ strategy: "static"
326
+ value: 1
327
+
328
+ # Transforms and Synthesis
329
+ - name: "image_caption"
330
+ type: "stage"
331
+ phase: 4 # TRANSFORM
332
+ actor: "nv_ingest.framework.orchestration.ray.stages.transforms.image_caption:ImageCaptionTransformStage"
333
+ config:
334
+ api_key: $NGC_API_KEY|$NVIDIA_API_KEY
335
+ endpoint_url: $VLM_CAPTION_ENDPOINT|"http://vlm:8000/v1/chat/completions"
336
+ model_name: $VLM_CAPTION_MODEL_NAME|"nvidia/nemotron-nano-12b-v2-vl"
337
+ prompt: "Caption the content of this image:"
338
+ replicas:
339
+ min_replicas: 0
340
+ max_replicas:
341
+ strategy: "static"
342
+ value: 1
343
+ static_replicas:
344
+ strategy: "static"
345
+ value: 1
346
+
347
+ - name: "text_embedder"
348
+ type: "stage"
349
+ phase: 4 # TRANSFORM
350
+ actor: "nv_ingest.framework.orchestration.ray.stages.transforms.text_embed:TextEmbeddingTransformStage"
351
+ config:
352
+ api_key: $NGC_API_KEY|$NVIDIA_API_KEY
353
+ embedding_model: $EMBEDDING_NIM_MODEL_NAME|"nvidia/llama-3.2-nv-embedqa-1b-v2"
354
+ embedding_nim_endpoint: $EMBEDDING_NIM_ENDPOINT|"https://integrate.api.nvidia.com/v1"
355
+ replicas:
356
+ min_replicas: 0
357
+ max_replicas:
358
+ strategy: "static"
359
+ value: 2
360
+ static_replicas:
361
+ strategy: "static"
362
+ value: 1
363
+
364
+ # Storage and Output
365
+ - name: "image_storage"
366
+ type: "stage"
367
+ phase: 5 # RESPONSE
368
+ actor: "nv_ingest.framework.orchestration.ray.stages.storage.image_storage:ImageStorageStage"
369
+ replicas:
370
+ min_replicas: 0
371
+ max_replicas:
372
+ strategy: "static"
373
+ value: 1
374
+ static_replicas:
375
+ strategy: "static"
376
+ value: 1
377
+
378
+ - name: "embedding_storage"
379
+ type: "stage"
380
+ phase: 5 # RESPONSE
381
+ actor: "nv_ingest.framework.orchestration.ray.stages.storage.store_embeddings:EmbeddingStorageStage"
382
+ replicas:
383
+ min_replicas: 0
384
+ max_replicas:
385
+ strategy: "static"
386
+ value: 1
387
+ static_replicas:
388
+ strategy: "static"
389
+ value: 1
390
+
391
+ - name: "broker_response"
392
+ type: "stage"
393
+ phase: 5 # RESPONSE
394
+ actor: "nv_ingest.framework.orchestration.ray.stages.sinks.message_broker_task_sink:MessageBrokerTaskSinkStage"
395
+ config:
396
+ broker_client:
397
+ client_type: "simple"
398
+ host: "localhost"
399
+ port: 7671
400
+ replicas:
401
+ min_replicas: 1
402
+ max_replicas:
403
+ strategy: "static"
404
+ value: 2
405
+ static_replicas:
406
+ strategy: "static"
407
+ value: 1
408
+
409
+ # Telemetry and Drain
410
+ - name: "otel_tracer"
411
+ type: "stage"
412
+ phase: 6 # TELEMETRY
413
+ actor: "nv_ingest.framework.orchestration.ray.stages.telemetry.otel_tracer:OpenTelemetryTracerStage"
414
+ config:
415
+ otel_endpoint: $OTEL_EXPORTER_OTLP_ENDPOINT|"http://localhost:4317"
416
+ replicas:
417
+ min_replicas: 0
418
+ max_replicas:
419
+ strategy: "static"
420
+ value: 1
421
+ static_replicas:
422
+ strategy: "static"
423
+ value: 1
424
+
425
+ - name: "default_drain"
426
+ type: "sink"
427
+ phase: 7 # DRAIN
428
+ actor: "nv_ingest.framework.orchestration.ray.stages.sinks.default_drain:DefaultDrainSink"
429
+ config: {}
430
+ replicas:
431
+ min_replicas: 1
432
+ max_replicas:
433
+ strategy: "static"
434
+ value: 1
435
+ static_replicas:
436
+ strategy: "static"
437
+ value: 1
438
+
439
+ edges:
440
+ # Intake
441
+ - from: "source_stage"
442
+ to: "metadata_injector"
443
+ queue_size: 32
444
+
445
+ # Document Extractors
446
+ - from: "metadata_injector"
447
+ to: "pdf_extractor"
448
+ queue_size: 32
449
+ - from: "pdf_extractor"
450
+ to: "audio_extractor"
451
+ queue_size: 32
452
+ - from: "audio_extractor"
453
+ to: "docx_extractor"
454
+ queue_size: 32
455
+ - from: "docx_extractor"
456
+ to: "pptx_extractor"
457
+ queue_size: 32
458
+ - from: "pptx_extractor"
459
+ to: "image_extractor"
460
+ queue_size: 32
461
+ - from: "image_extractor"
462
+ to: "html_extractor"
463
+ queue_size: 32
464
+ - from: "html_extractor"
465
+ to: "infographic_extractor"
466
+ queue_size: 32
467
+
468
+ # Primitive Extractors
469
+ - from: "infographic_extractor"
470
+ to: "table_extractor"
471
+ queue_size: 32
472
+ - from: "table_extractor"
473
+ to: "chart_extractor"
474
+ queue_size: 32
475
+ - from: "chart_extractor"
476
+ to: "image_filter"
477
+ queue_size: 32
478
+
479
+ # Primitive Mutators
480
+ - from: "image_filter"
481
+ to: "image_dedup"
482
+ queue_size: 32
483
+ - from: "image_dedup"
484
+ to: "text_splitter"
485
+ queue_size: 32
486
+
487
+ # Primitive Transforms
488
+ - from: "text_splitter"
489
+ to: "image_caption"
490
+ queue_size: 32
491
+ - from: "image_caption"
492
+ to: "text_embedder"
493
+ queue_size: 32
494
+ - from: "text_embedder"
495
+ to: "image_storage"
496
+ queue_size: 32
497
+
498
+ # Primitive Storage
499
+ - from: "image_storage"
500
+ to: "embedding_storage"
501
+ queue_size: 32
502
+ - from: "embedding_storage"
503
+ to: "broker_response"
504
+ queue_size: 32
505
+
506
+ # Response and Telemetry
507
+ - from: "broker_response"
508
+ to: "otel_tracer"
509
+ queue_size: 32
510
+ - from: "otel_tracer"
511
+ to: "default_drain"
512
+ queue_size: 32
513
+
514
+ # Pipeline Runtime Configuration
515
+ pipeline:
516
+ disable_dynamic_scaling: $INGEST_DISABLE_DYNAMIC_SCALING|true
517
+ dynamic_memory_threshold: $INGEST_DYNAMIC_MEMORY_THRESHOLD|0.75
518
+ static_memory_threshold: $INGEST_STATIC_MEMORY_THRESHOLD|0.75
519
+ pid_controller:
520
+ kp: $INGEST_DYNAMIC_MEMORY_KP|0.2
521
+ ki: $INGEST_DYNAMIC_MEMORY_KI|0.01
522
+ ema_alpha: $INGEST_DYNAMIC_MEMORY_EMA_ALPHA|0.1
523
+ target_queue_depth: $INGEST_DYNAMIC_MEMORY_TARGET_QUEUE_DEPTH|0
524
+ penalty_factor: $INGEST_DYNAMIC_MEMORY_PENALTY_FACTOR|0.1
525
+ error_boost_factor: $INGEST_DYNAMIC_MEMORY_ERROR_BOOST_FACTOR|1.5
526
+ rcm_memory_safety_buffer_fraction: $INGEST_DYNAMIC_MEMORY_RCM_MEMORY_SAFETY_BUFFER_FRACTION|0.15
527
+ launch_simple_broker: $INGEST_LAUNCH_SIMPLE_BROKER|true
528
+ """