You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bf08c36
Browse filesBrowse the repository at this point in the historyBrowse files
<imgsrc="docs/assets/readme/paper-program-execution.svg"width="100%"alt="A RayOrch program lowered into structural lineage and per-Call actor execution" />
97
97
</p>
98
98
99
+
Read the diagram from left to right through this concrete PDF parsing pipeline:
100
+
101
+
```python
102
+
import rayorch as ro
103
+
from rayorch import F
104
+
from rayorch.benchmarks.mineru.udfs import (
105
+
MinerUAssembleDoc,
106
+
MinerUPdfToPages,
107
+
MinerUVlmOcrPage,
108
+
PdfMetadata,
109
+
)
110
+
111
+
112
+
classPdfPipeline(ro.Pipeline):
113
+
def__init__(self, model_path, output_dir):
114
+
# Python program: declare the stages and their physical policies.
The three layers in the figure correspond to this code:
148
+
149
+
1.**Python program.**`forward()` composes ordinary `RayModule` calls and `F` operations. It is traced once; the UDFs do not run while the graph is being built.
150
+
2.**Structural control plane.**`F.expand` records each PDF's ordered page membership. `F.reduce_aligned` records how page outputs and page records close back into the same document. These symbolic Ports carry lineage, order, and readiness; they do not create actors.
151
+
3.**Physical execution plane.** The `ray_options(...)` values create the actor pools. At runtime, ready page `Grain`s from different PDFs can share one execution microbatch on the OCR actors. The physical batch may change, while the control-plane lineage keeps each document's pages separate and ordered.
152
+
153
+
The complete UDF implementations live in [`rayorch/benchmarks/mineru/udfs.py`](rayorch/benchmarks/mineru/udfs.py); the full configurable pipeline is [`rayorch/benchmarks/mineru/pipeline.py`](rayorch/benchmarks/mineru/pipeline.py).
0 commit comments