Skip to content

Commit

Permalink
Parallelism Documentation Fixes (#493)
Browse files Browse the repository at this point in the history
* Updated example imports to include RunnableGraph class

* Updated halt_after to be a List[str] as defined by RunnableGraph

* Docs import fix
  • Loading branch information
mdrideout authored Jan 2, 2025
1 parent 5bf5ed0 commit 386336e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/concepts/parallelism.rst
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ This might look as follows -- say we have a simple subflow that takes in a raw p
from typing import Dict, Any
from burr.core import action, state
from burr.core.graph import Graph
from burr.core.parallelism import RunnableGraph
@action(reads=["prompt"], writes=["processed_prompt"])
def process_prompt(state: State) -> State:
Expand All @@ -306,7 +307,7 @@ This might look as follows -- say we have a simple subflow that takes in a raw p
runnable_graph = RunnableGraph(
graph=graph,
entrypoint="process_prompt",
halt_after="query_llm"
halt_after=["query_llm"]
)
class TestMultiplePromptsWithSubgraph(MapStates):
Expand Down Expand Up @@ -340,7 +341,7 @@ This looks as follows:

.. code-block:: python
from burr.core import action, state
from burr.core import action, State, ApplicationContext
from burr.core.graph import Graph
@action(reads=["prompt"], writes=["processed_prompt"])
Expand Down

0 comments on commit 386336e

Please sign in to comment.