This commit is contained in:
@@ -599,6 +599,15 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#dagpipe.engine--guarantees" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Guarantees
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -831,6 +840,15 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#dagpipe.engine--guarantees" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Guarantees
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -956,23 +974,19 @@
|
||||
|
||||
<div class="doc doc-contents first">
|
||||
|
||||
<p>Execution engine responsible for running pipelines and graphs.</p>
|
||||
<hr />
|
||||
<h4 id="dagpipe.engine--summary">Summary</h4>
|
||||
<p>The Engine executes Node objects and propagates immutable State instances
|
||||
through either a linear sequence or a directed acyclic graph (Graph).
|
||||
<h3 id="dagpipe.engine--summary">Summary</h3>
|
||||
<p>Execution engine responsible for running pipelines and graphs.</p>
|
||||
<p>The <code>Engine</code> executes <code>Node</code> objects and propagates immutable <code>State</code> instances
|
||||
through either a linear sequence or a directed acyclic graph (<code>Graph</code>).
|
||||
It orchestrates execution order, branching, and state propagation.</p>
|
||||
<hr />
|
||||
<h3 id="dagpipe.engine--guarantees">Guarantees</h3>
|
||||
<ul>
|
||||
<li>Deterministic execution and consistent state lineage.</li>
|
||||
<li>Orchestrates execution without modifying <code>Graph</code>, <code>Node</code>, or <code>State</code> objects.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<details class="notes" open>
|
||||
<summary>Notes</summary>
|
||||
<p><strong>Guarantees:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>- Deterministic execution and consistent state lineage.
|
||||
- Orchestrates execution without modifying Graph, Node, or State objects.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
|
||||
|
||||
<div class="doc doc-children">
|
||||
|
||||
@@ -1005,15 +1019,21 @@ It orchestrates execution order, branching, and state propagation.</p>
|
||||
<summary>Notes</summary>
|
||||
<p><strong>Responsibilities:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>- Accepts either a linear sequence of Nodes or a Graph defining execution topology.
|
||||
- Propagates immutable State objects through Nodes and collects terminal States.
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Accepts either a linear sequence of `Node` objects or a `Graph`
|
||||
defining execution topology.
|
||||
- Propagates immutable `State` objects through `Node` objects and
|
||||
collects terminal states.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
<p><strong>Guarantees:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Never mutates State, Node, or Graph instances.
|
||||
- State objects are never modified in place; each branch produces independent instances.
|
||||
<span class="normal">4</span>
|
||||
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><code>- Never mutates `State`, `Node`, or `Graph` instances.
|
||||
- `State` objects are never modified in place; each branch produces
|
||||
independent instances.
|
||||
- Execution order is deterministic and follows graph or pipeline topology.
|
||||
- Thread-safe for concurrent execution.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
@@ -1035,7 +1055,7 @@ It orchestrates execution order, branching, and state propagation.</p>
|
||||
<tr class="doc-section-item">
|
||||
<td><code>nodes_or_graph</code></td>
|
||||
<td>
|
||||
<code><span title="typing.Sequence">Sequence</span>[<a class="autorefs autorefs-internal" title="dagpipe.node.Node" href="../dagpipe/node/#dagpipe.node.Node">Node</a>] | <a class="autorefs autorefs-internal" title="dagpipe.graph.Graph" href="../dagpipe/graph/#dagpipe.graph.Graph">Graph</a></code>
|
||||
<code><span title="typing.Sequence">Sequence</span>[<a class="autorefs autorefs-internal" title="dagpipe.node.Node" href="../node/#dagpipe.node.Node">Node</a>] | <a class="autorefs autorefs-internal" title="dagpipe.graph.Graph" href="../graph/#dagpipe.graph.Graph">Graph</a></code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
@@ -1065,7 +1085,8 @@ It orchestrates execution order, branching, and state propagation.</p>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
<p>If input is not a Sequence[Node] or Graph, or contains invalid node types.</p>
|
||||
<p>If input is not a <code>Sequence[Node]</code> or <code>Graph</code>, or contains
|
||||
invalid node types.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1076,7 +1097,9 @@ It orchestrates execution order, branching, and state propagation.</p>
|
||||
<details class="notes" open>
|
||||
<summary>Notes</summary>
|
||||
<p><strong>Responsibilities:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>- Detects execution mode (linear or DAG) and validates node types and structure.
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>- Detects execution mode (linear or DAG) and validates node
|
||||
types and structure.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
|
||||
@@ -1122,7 +1145,7 @@ It orchestrates execution order, branching, and state propagation.</p>
|
||||
<tbody>
|
||||
<tr class="doc-section-item">
|
||||
<td>
|
||||
<code>tuple[<a class="autorefs autorefs-internal" title="dagpipe.node.Node" href="../dagpipe/node/#dagpipe.node.Node">Node</a>, ...]</code>
|
||||
<code>tuple[<a class="autorefs autorefs-internal" title="dagpipe.node.Node" href="../node/#dagpipe.node.Node">Node</a>, ...]</code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
@@ -1194,7 +1217,7 @@ Ordered sequence in linear mode or all nodes in graph mode.</p>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>Execute the pipeline starting from a root State.</p>
|
||||
<p>Execute the pipeline starting from a root <code>State</code>.</p>
|
||||
|
||||
|
||||
<p><span class="doc-section-title">Parameters:</span></p>
|
||||
@@ -1211,7 +1234,7 @@ Ordered sequence in linear mode or all nodes in graph mode.</p>
|
||||
<tr class="doc-section-item">
|
||||
<td><code>root</code></td>
|
||||
<td>
|
||||
<code><a class="autorefs autorefs-internal" title="dagpipe.state.State" href="../dagpipe/state/#dagpipe.state.State">State</a></code>
|
||||
<code><a class="autorefs autorefs-internal" title="dagpipe.state.State" href="../state/#dagpipe.state.State">State</a></code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
@@ -1237,7 +1260,7 @@ Ordered sequence in linear mode or all nodes in graph mode.</p>
|
||||
<tbody>
|
||||
<tr class="doc-section-item">
|
||||
<td>
|
||||
<code><span title="typing.List">List</span>[<a class="autorefs autorefs-internal" title="dagpipe.state.State" href="../dagpipe/state/#dagpipe.state.State">State</a>]</code>
|
||||
<code><span title="typing.List">List</span>[<a class="autorefs autorefs-internal" title="dagpipe.state.State" href="../state/#dagpipe.state.State">State</a>]</code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
@@ -1265,7 +1288,7 @@ Terminal execution states produced by the pipeline.</p>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
<p>If root is not a State instance.</p>
|
||||
<p>If <code>root</code> is not a <code>State</code> instance.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1286,7 +1309,9 @@ Terminal execution states produced by the pipeline.</p>
|
||||
<details class="notes" open>
|
||||
<summary>Notes</summary>
|
||||
<p><strong>Responsibilities:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>- Selects execution mode, propagates state through nodes, creates new instances for branches, and collects terminal states.
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>- Selects execution mode, propagates state through nodes, creates
|
||||
new instances for branches, and collects terminal states.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user