Skip to content

Commit

Permalink
fix: iteration node in parallel mode token count error (#11539)
Browse files Browse the repository at this point in the history
Co-authored-by: Novice Lee <[email protected]>
  • Loading branch information
2 people authored and iamjoel committed Dec 16, 2024
1 parent 14912b2 commit 72b1bed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/workflow/nodes/iteration/iteration_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ def _run(self) -> Generator[NodeEvent | InNodeEvent, None, None]:
future.add_done_callback(thread_pool.task_done_callback)
futures.append(future)
succeeded_count = 0
empty_count = 0
while True:
try:
event = q.get(timeout=1)
Expand Down Expand Up @@ -593,3 +592,4 @@ def _run_single_iter_parallel(
parallel_mode_run_id=parallel_mode_run_id,
):
q.put(event)
graph_engine.graph_runtime_state.total_tokens += graph_engine_copy.graph_runtime_state.total_tokens

0 comments on commit 72b1bed

Please sign in to comment.