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,557 @@
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 (runtime default).
11
+
12
+ This module embeds the exact contents of config/default_pipeline.yaml so code can
13
+ load the default pipeline without reading the YAML file at runtime.
14
+ """
15
+
16
+ DEFAULT_PIPELINE_YAML = """# Default Ingestion Pipeline Configuration
17
+ # This file replicates the static pipeline defined in pipeline_builders.py
18
+
19
+ name: "NVIngest default pipeline"
20
+ description: "This is the default ingestion pipeline for NVIngest"
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: $MESSAGE_CLIENT_TYPE|"redis"
30
+ host: $MESSAGE_CLIENT_HOST|"redis"
31
+ port: $MESSAGE_CLIENT_PORT|6379
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
+
43
+ # Pre-processing
44
+ - name: "metadata_injector"
45
+ type: "stage"
46
+ phase: 0 # PRE_PROCESSING
47
+ actor: "nv_ingest.framework.orchestration.ray.stages.injectors.metadata_injector:MetadataInjectionStage"
48
+ config: {}
49
+ replicas:
50
+ min_replicas: 0
51
+ max_replicas:
52
+ strategy: "static"
53
+ value: 1
54
+ static_replicas:
55
+ strategy: "static"
56
+ value: 1
57
+ runs_after:
58
+ - "source_stage"
59
+
60
+ # Primitive Extraction
61
+ - name: "pdf_extractor"
62
+ type: "stage"
63
+ phase: 1 # EXTRACTION
64
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.pdf_extractor:PDFExtractorStage"
65
+ config:
66
+ pdfium_config:
67
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
68
+ yolox_endpoints: [
69
+ $YOLOX_GRPC_ENDPOINT|"page-elements:8001",
70
+ $YOLOX_HTTP_ENDPOINT|"http://page-elements:8000/v1/infer",
71
+ ]
72
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|grpc
73
+ nemoretriever_parse_config:
74
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
75
+ nemoretriever_parse_endpoints: [
76
+ $NEMORETRIEVER_PARSE_GRPC_ENDPOINT|"",
77
+ $NEMORETRIEVER_PARSE_HTTP_ENDPOINT|"http://nemoretriever-parse:8000/v1/chat/completions",
78
+ ]
79
+ nemoretriever_parse_infer_protocol: $NEMORETRIEVER_PARSE_INFER_PROTOCOL|http
80
+ nemoretriever_parse_model_name: $NEMORETRIEVER_PARSE_MODEL_NAME|"nvidia/nemoretriever-parse"
81
+ yolox_endpoints: [
82
+ $YOLOX_GRPC_ENDPOINT|"page-elements:8001",
83
+ $YOLOX_HTTP_ENDPOINT|"http://page-elements:8000/v1/infer",
84
+ ]
85
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|grpc
86
+ replicas:
87
+ min_replicas: 0
88
+ max_replicas:
89
+ strategy: "memory_thresholding"
90
+ memory_per_replica_mb: 10000 # Heuristic max consumption
91
+ static_replicas:
92
+ strategy: "memory_static_global_percent"
93
+ memory_per_replica_mb: 10000
94
+ limit: 16
95
+
96
+ - name: "audio_extractor"
97
+ type: "stage"
98
+ phase: 1 # EXTRACTION
99
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.audio_extractor:AudioExtractorStage"
100
+ config:
101
+ audio_extraction_config:
102
+ audio_endpoints: [
103
+ $AUDIO_GRPC_ENDPOINT|"audio:50051",
104
+ $AUDIO_HTTP_ENDPOINT|"",
105
+ ]
106
+ function_id: $AUDIO_FUNCTION_ID|""
107
+ audio_infer_protocol: $AUDIO_INFER_PROTOCOL|grpc
108
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
109
+ replicas:
110
+ min_replicas: 0
111
+ max_replicas:
112
+ strategy: "static"
113
+ value: 2
114
+ static_replicas:
115
+ strategy: "static"
116
+ value: 2
117
+
118
+ - name: "docx_extractor"
119
+ type: "stage"
120
+ phase: 1 # EXTRACTION
121
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.docx_extractor:DocxExtractorStage"
122
+ config:
123
+ docx_extraction_config:
124
+ yolox_endpoints: [
125
+ $YOLOX_GRPC_ENDPOINT|"page-elements:8001",
126
+ $YOLOX_HTTP_ENDPOINT|"http://page-elements:8000/v1/infer",
127
+ ]
128
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|grpc
129
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
130
+ pdfium_config:
131
+ yolox_endpoints: [
132
+ $YOLOX_GRPC_ENDPOINT|"page-elements:8001",
133
+ $YOLOX_HTTP_ENDPOINT|"http://page-elements:8000/v1/infer",
134
+ ]
135
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|grpc
136
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
137
+ replicas:
138
+ min_replicas: 0
139
+ max_replicas:
140
+ strategy: "static"
141
+ value: 2
142
+ static_replicas:
143
+ strategy: "static"
144
+ value: 1
145
+
146
+ - name: "pptx_extractor"
147
+ type: "stage"
148
+ phase: 1 # EXTRACTION
149
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.pptx_extractor:PPTXExtractorStage"
150
+ config:
151
+ pptx_extraction_config:
152
+ yolox_endpoints: [
153
+ $YOLOX_GRPC_ENDPOINT|"page-elements:8001",
154
+ $YOLOX_HTTP_ENDPOINT|"http://page-elements:8000/v1/infer",
155
+ ]
156
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|grpc
157
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
158
+ pdfium_config:
159
+ yolox_endpoints: [
160
+ $YOLOX_GRPC_ENDPOINT|"page-elements:8001",
161
+ $YOLOX_HTTP_ENDPOINT|"http://page-elements:8000/v1/infer",
162
+ ]
163
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|grpc
164
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
165
+ replicas:
166
+ min_replicas: 0
167
+ max_replicas:
168
+ strategy: "static"
169
+ value: 2
170
+ static_replicas:
171
+ strategy: "static"
172
+ value: 1
173
+
174
+ - name: "image_extractor"
175
+ type: "stage"
176
+ phase: 1 # EXTRACTION
177
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.image_extractor:ImageExtractorStage"
178
+ config:
179
+ image_extraction_config:
180
+ yolox_endpoints: [
181
+ $YOLOX_GRPC_ENDPOINT|"page-elements:8001",
182
+ $YOLOX_HTTP_ENDPOINT|"http://page-elements:8000/v1/infer",
183
+ ]
184
+ yolox_infer_protocol: $YOLOX_INFER_PROTOCOL|grpc
185
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
186
+ replicas:
187
+ min_replicas: 0
188
+ max_replicas:
189
+ strategy: "static"
190
+ value: 2
191
+ static_replicas:
192
+ strategy: "static"
193
+ value: 1
194
+
195
+ - name: "html_extractor"
196
+ type: "stage"
197
+ phase: 1 # EXTRACTION
198
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.html_extractor:HtmlExtractorStage"
199
+ config: {}
200
+ replicas:
201
+ min_replicas: 0
202
+ max_replicas:
203
+ strategy: "static"
204
+ value: 2
205
+ static_replicas:
206
+ strategy: "static"
207
+ value: 1
208
+
209
+ - name: "ocr_extractor"
210
+ type: "stage"
211
+ phase: 1 # EXTRACTION
212
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.ocr_extractor:OCRExtractorStage"
213
+ config:
214
+ endpoint_config:
215
+ ocr_endpoints: [
216
+ $OCR_GRPC_ENDPOINT|"ocr:8001",
217
+ $OCR_HTTP_ENDPOINT|"http://ocr:8000/v1/infer",
218
+ ]
219
+ ocr_infer_protocol: $OCR_INFER_PROTOCOL|grpc
220
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
221
+ replicas:
222
+ min_replicas: 0
223
+ max_replicas:
224
+ strategy: "static"
225
+ value: 4
226
+ static_replicas:
227
+ strategy: "static"
228
+ value: 3
229
+
230
+ - name: "infographic_extractor"
231
+ type: "stage"
232
+ phase: 1 # EXTRACTION
233
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.infographic_extractor:InfographicExtractorStage"
234
+ config:
235
+ endpoint_config:
236
+ ocr_endpoints: [
237
+ $OCR_GRPC_ENDPOINT|"ocr:8001",
238
+ $OCR_HTTP_ENDPOINT|"http://ocr:8000/v1/infer",
239
+ ]
240
+ ocr_infer_protocol: $OCR_INFER_PROTOCOL|grpc
241
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
242
+ replicas:
243
+ min_replicas: 0
244
+ max_replicas:
245
+ strategy: "static"
246
+ value: 2
247
+ static_replicas:
248
+ strategy: "static"
249
+ value: 1
250
+
251
+ - name: "table_extractor"
252
+ type: "stage"
253
+ phase: 1 # EXTRACTION
254
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.table_extractor:TableExtractorStage"
255
+ config:
256
+ endpoint_config:
257
+ yolox_endpoints: [
258
+ $YOLOX_TABLE_STRUCTURE_GRPC_ENDPOINT|"table-structure:8001",
259
+ $YOLOX_TABLE_STRUCTURE_HTTP_ENDPOINT|"http://table-structure:8000/v1/infer",
260
+ ]
261
+ yolox_infer_protocol: $YOLOX_TABLE_STRUCTURE_INFER_PROTOCOL|grpc
262
+ ocr_endpoints: [
263
+ $OCR_GRPC_ENDPOINT|"ocr:8001",
264
+ $OCR_HTTP_ENDPOINT|"http://ocr:8000/v1/infer",
265
+ ]
266
+ ocr_infer_protocol: $OCR_INFER_PROTOCOL|grpc
267
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
268
+ replicas:
269
+ min_replicas: 0
270
+ max_replicas:
271
+ strategy: "memory_thresholding"
272
+ memory_per_replica_mb: 10000
273
+ static_replicas:
274
+ strategy: "memory_static_global_percent"
275
+ memory_per_replica_mb: 10000
276
+ limit: 6
277
+
278
+ - name: "chart_extractor"
279
+ type: "stage"
280
+ phase: 1 # EXTRACTION
281
+ actor: "nv_ingest.framework.orchestration.ray.stages.extractors.chart_extractor:ChartExtractorStage"
282
+ config:
283
+ endpoint_config:
284
+ yolox_endpoints: [
285
+ $YOLOX_GRAPHIC_ELEMENTS_GRPC_ENDPOINT|"graphic-elements:8001",
286
+ $YOLOX_GRAPHIC_ELEMENTS_HTTP_ENDPOINT|""
287
+ ]
288
+ yolox_infer_protocol: $YOLOX_GRAPHIC_ELEMENTS_INFER_PROTOCOL|grpc
289
+ ocr_endpoints: [
290
+ $OCR_GRPC_ENDPOINT|"ocr:8001",
291
+ $OCR_HTTP_ENDPOINT|""
292
+ ]
293
+ ocr_infer_protocol: $OCR_INFER_PROTOCOL|grpc
294
+ auth_token: $NGC_API_KEY|$NVIDIA_API_KEY
295
+ replicas:
296
+ min_replicas: 0
297
+ max_replicas:
298
+ strategy: "memory_thresholding"
299
+ memory_per_replica_mb: 10000
300
+ static_replicas:
301
+ strategy: "memory_static_global_percent"
302
+ memory_per_replica_mb: 10000
303
+ limit: 6
304
+
305
+ # Post-processing / Mutators
306
+ - name: "image_filter"
307
+ type: "stage"
308
+ phase: 3 # MUTATION
309
+ actor: "nv_ingest.framework.orchestration.ray.stages.mutate.image_filter:ImageFilterStage"
310
+ replicas:
311
+ min_replicas: 0
312
+ max_replicas:
313
+ strategy: "static"
314
+ value: 1
315
+ static_replicas:
316
+ strategy: "static"
317
+ value: 1
318
+
319
+ - name: "image_dedup"
320
+ type: "stage"
321
+ phase: 3 # MUTATION
322
+ actor: "nv_ingest.framework.orchestration.ray.stages.mutate.image_dedup:ImageDedupStage"
323
+ replicas:
324
+ min_replicas: 0
325
+ max_replicas:
326
+ strategy: "static"
327
+ value: 1
328
+ static_replicas:
329
+ strategy: "static"
330
+ value: 1
331
+
332
+ - name: "text_splitter"
333
+ type: "stage"
334
+ phase: 4 # TRANSFORM
335
+ actor: "nv_ingest.framework.orchestration.ray.stages.transforms.text_splitter:TextSplitterStage"
336
+ config:
337
+ chunk_size: 512
338
+ chunk_overlap: 20
339
+ replicas:
340
+ min_replicas: 0
341
+ max_replicas:
342
+ strategy: "static"
343
+ value: 3
344
+ static_replicas:
345
+ strategy: "static"
346
+ value: 1
347
+
348
+ # Transforms and Synthesis
349
+ - name: "image_caption"
350
+ type: "stage"
351
+ phase: 4 # TRANSFORM
352
+ actor: "nv_ingest.framework.orchestration.ray.stages.transforms.image_caption:ImageCaptionTransformStage"
353
+ config:
354
+ api_key: $NGC_API_KEY|$NVIDIA_API_KEY
355
+ model_name: $VLM_CAPTION_MODEL_NAME|"nvidia/nemotron-nano-12b-v2-vl"
356
+ endpoint_url: $VLM_CAPTION_ENDPOINT|"http://vlm:8000/v1/chat/completions"
357
+ prompt: "Caption the content of this image:"
358
+ replicas:
359
+ min_replicas: 0
360
+ max_replicas:
361
+ strategy: "static"
362
+ value: 1
363
+ static_replicas:
364
+ strategy: "static"
365
+ value: 1
366
+
367
+ - name: "text_embedder"
368
+ type: "stage"
369
+ phase: 4 # TRANSFORM
370
+ actor: "nv_ingest.framework.orchestration.ray.stages.transforms.text_embed:TextEmbeddingTransformStage"
371
+ config:
372
+ api_key: $NGC_API_KEY|$NVIDIA_API_KEY
373
+ embedding_model: $EMBEDDING_NIM_MODEL_NAME|"nvidia/llama-3.2-nv-embedqa-1b-v2"
374
+ embedding_nim_endpoint: $EMBEDDING_NIM_ENDPOINT|"http://embedding:8000/v1"
375
+ replicas:
376
+ min_replicas: 0
377
+ max_replicas:
378
+ strategy: "static"
379
+ value: 4
380
+ static_replicas:
381
+ strategy: "static"
382
+ value: 3
383
+
384
+ # Storage and Output
385
+ - name: "image_storage"
386
+ type: "stage"
387
+ phase: 5 # RESPONSE
388
+ actor: "nv_ingest.framework.orchestration.ray.stages.storage.image_storage:ImageStorageStage"
389
+ config:
390
+ storage_uri: $IMAGE_STORAGE_URI|"s3://nv-ingest/artifacts/store/images"
391
+ public_base_url: $IMAGE_STORAGE_PUBLIC_BASE_URL|""
392
+ replicas:
393
+ min_replicas: 0
394
+ max_replicas:
395
+ strategy: "static"
396
+ value: 1
397
+ static_replicas:
398
+ strategy: "static"
399
+ value: 1
400
+
401
+ - name: "embedding_storage"
402
+ type: "stage"
403
+ phase: 5 # RESPONSE
404
+ actor: "nv_ingest.framework.orchestration.ray.stages.storage.store_embeddings:EmbeddingStorageStage"
405
+ replicas:
406
+ min_replicas: 0
407
+ max_replicas:
408
+ strategy: "static"
409
+ value: 1
410
+ static_replicas:
411
+ strategy: "static"
412
+ value: 1
413
+
414
+ - name: "broker_response"
415
+ type: "stage"
416
+ phase: 5 # RESPONSE
417
+ actor: "nv_ingest.framework.orchestration.ray.stages.sinks.message_broker_task_sink:MessageBrokerTaskSinkStage"
418
+ config:
419
+ broker_client:
420
+ client_type: $MESSAGE_CLIENT_TYPE|"redis"
421
+ host: $MESSAGE_CLIENT_HOST|localhost
422
+ port: $MESSAGE_CLIENT_PORT|6379
423
+ poll_interval: 0.1
424
+ replicas:
425
+ min_replicas: 1
426
+ max_replicas:
427
+ strategy: "static"
428
+ value: 2
429
+ static_replicas:
430
+ strategy: "static"
431
+ value: 1
432
+
433
+ # Telemetry and Drain
434
+ - name: "otel_tracer"
435
+ type: "stage"
436
+ phase: 6 # TELEMETRY
437
+ actor: "nv_ingest.framework.orchestration.ray.stages.telemetry.otel_tracer:OpenTelemetryTracerStage"
438
+ config:
439
+ otel_endpoint: $OTEL_EXPORTER_OTLP_ENDPOINT|"http://localhost:4317"
440
+ replicas:
441
+ min_replicas: 0
442
+ max_replicas:
443
+ strategy: "static"
444
+ value: 1
445
+ static_replicas:
446
+ strategy: "static"
447
+ value: 1
448
+ runs_after:
449
+ - "broker_response"
450
+
451
+ - name: "default_drain"
452
+ type: "sink"
453
+ phase: 7 # DRAIN
454
+ actor: "nv_ingest.framework.orchestration.ray.stages.sinks.default_drain:DefaultDrainSink"
455
+ config: {}
456
+ replicas:
457
+ min_replicas: 1
458
+ max_replicas:
459
+ strategy: "static"
460
+ value: 1
461
+ static_replicas:
462
+ strategy: "static"
463
+ value: 1
464
+
465
+ edges:
466
+ # Intake
467
+ - from: "source_stage"
468
+ to: "metadata_injector"
469
+ queue_size: 4
470
+
471
+ # Document Extractors
472
+ - from: "metadata_injector"
473
+ to: "pdf_extractor"
474
+ queue_size: 8
475
+ - from: "pdf_extractor"
476
+ to: "audio_extractor"
477
+ queue_size: 4
478
+ - from: "audio_extractor"
479
+ to: "docx_extractor"
480
+ queue_size: 4
481
+ - from: "docx_extractor"
482
+ to: "pptx_extractor"
483
+ queue_size: 4
484
+ - from: "pptx_extractor"
485
+ to: "image_extractor"
486
+ queue_size: 4
487
+ - from: "image_extractor"
488
+ to: "html_extractor"
489
+ queue_size: 4
490
+ - from: "html_extractor"
491
+ to: "infographic_extractor"
492
+ queue_size: 4
493
+
494
+ # Primitive Extractors
495
+ - from: "infographic_extractor"
496
+ to: "table_extractor"
497
+ queue_size: 4
498
+ - from: "table_extractor"
499
+ to: "chart_extractor"
500
+ queue_size: 4
501
+ - from: "chart_extractor"
502
+ to: "ocr_extractor"
503
+ queue_size: 8
504
+ - from: "ocr_extractor"
505
+ to: "image_filter"
506
+ queue_size: 4
507
+
508
+ # Primitive Mutators
509
+ - from: "image_filter"
510
+ to: "image_dedup"
511
+ queue_size: 4
512
+ - from: "image_dedup"
513
+ to: "text_splitter"
514
+ queue_size: 4
515
+
516
+ # Primitive Transforms
517
+ - from: "text_splitter"
518
+ to: "image_caption"
519
+ queue_size: 4
520
+ - from: "image_caption"
521
+ to: "text_embedder"
522
+ queue_size: 4
523
+ - from: "text_embedder"
524
+ to: "image_storage"
525
+ queue_size: 4
526
+
527
+ # Primitive Storage
528
+ - from: "image_storage"
529
+ to: "embedding_storage"
530
+ queue_size: 4
531
+ - from: "embedding_storage"
532
+ to: "broker_response"
533
+ queue_size: 4
534
+
535
+ # Response and Telemetry
536
+ - from: "broker_response"
537
+ to: "otel_tracer"
538
+ queue_size: 4
539
+ - from: "otel_tracer"
540
+ to: "default_drain"
541
+ queue_size: 4
542
+
543
+ # Pipeline Runtime Configuration
544
+ pipeline:
545
+ disable_dynamic_scaling: $INGEST_DISABLE_DYNAMIC_SCALING|false
546
+ dynamic_memory_threshold: $INGEST_DYNAMIC_MEMORY_THRESHOLD|0.75
547
+ static_memory_threshold: $INGEST_STATIC_MEMORY_THRESHOLD|0.75
548
+ pid_controller:
549
+ kp: $INGEST_DYNAMIC_MEMORY_KP|0.2
550
+ ki: $INGEST_DYNAMIC_MEMORY_KI|0.01
551
+ ema_alpha: $INGEST_DYNAMIC_MEMORY_EMA_ALPHA|0.1
552
+ target_queue_depth: $INGEST_DYNAMIC_MEMORY_TARGET_QUEUE_DEPTH|0
553
+ penalty_factor: $INGEST_DYNAMIC_MEMORY_PENALTY_FACTOR|0.1
554
+ error_boost_factor: $INGEST_DYNAMIC_MEMORY_ERROR_BOOST_FACTOR|1.5
555
+ rcm_memory_safety_buffer_fraction: $INGEST_DYNAMIC_MEMORY_RCM_MEMORY_SAFETY_BUFFER_FRACTION|0.15
556
+ launch_simple_broker: $INGEST_LAUNCH_SIMPLE_BROKER|false
557
+ """