Skip to content

Commit 72b1bed

Browse files
Nov1c444Novice Lee
authored andcommitted
fix: iteration node in parallel mode token count error (#11539)
Co-authored-by: Novice Lee <[email protected]>
1 parent 14912b2 commit 72b1bed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/core/workflow/nodes/iteration/iteration_node.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ def _run(self) -> Generator[NodeEvent | InNodeEvent, None, None]:
182182
future.add_done_callback(thread_pool.task_done_callback)
183183
futures.append(future)
184184
succeeded_count = 0
185-
empty_count = 0
186185
while True:
187186
try:
188187
event = q.get(timeout=1)
@@ -593,3 +592,4 @@ def _run_single_iter_parallel(
593592
parallel_mode_run_id=parallel_mode_run_id,
594593
):
595594
q.put(event)
595+
graph_engine.graph_runtime_state.total_tokens += graph_engine_copy.graph_runtime_state.total_tokens

0 commit comments

Comments
 (0)