@@ -166,18 +166,22 @@ def _prepare_single_node_execution(
166166
167167 # Determine which type of single node execution and get graph/variable_pool
168168 if single_iteration_run :
169- graph , variable_pool = self ._get_graph_and_variable_pool_of_single_iteration (
169+ graph , variable_pool = self ._get_graph_and_variable_pool_for_single_node_run (
170170 workflow = workflow ,
171171 node_id = single_iteration_run .node_id ,
172172 user_inputs = dict (single_iteration_run .inputs ),
173173 graph_runtime_state = graph_runtime_state ,
174+ node_type_filter_key = "iteration_id" ,
175+ node_type_label = "iteration" ,
174176 )
175177 elif single_loop_run :
176- graph , variable_pool = self ._get_graph_and_variable_pool_of_single_loop (
178+ graph , variable_pool = self ._get_graph_and_variable_pool_for_single_node_run (
177179 workflow = workflow ,
178180 node_id = single_loop_run .node_id ,
179181 user_inputs = dict (single_loop_run .inputs ),
180182 graph_runtime_state = graph_runtime_state ,
183+ node_type_filter_key = "loop_id" ,
184+ node_type_label = "loop" ,
181185 )
182186 else :
183187 raise ValueError ("Neither single_iteration_run nor single_loop_run is specified" )
@@ -314,44 +318,6 @@ def _get_graph_and_variable_pool_for_single_node_run(
314318
315319 return graph , variable_pool
316320
317- def _get_graph_and_variable_pool_of_single_iteration (
318- self ,
319- workflow : Workflow ,
320- node_id : str ,
321- user_inputs : dict [str , Any ],
322- graph_runtime_state : GraphRuntimeState ,
323- ) -> tuple [Graph , VariablePool ]:
324- """
325- Get variable pool of single iteration
326- """
327- return self ._get_graph_and_variable_pool_for_single_node_run (
328- workflow = workflow ,
329- node_id = node_id ,
330- user_inputs = user_inputs ,
331- graph_runtime_state = graph_runtime_state ,
332- node_type_filter_key = "iteration_id" ,
333- node_type_label = "iteration" ,
334- )
335-
336- def _get_graph_and_variable_pool_of_single_loop (
337- self ,
338- workflow : Workflow ,
339- node_id : str ,
340- user_inputs : dict [str , Any ],
341- graph_runtime_state : GraphRuntimeState ,
342- ) -> tuple [Graph , VariablePool ]:
343- """
344- Get variable pool of single loop
345- """
346- return self ._get_graph_and_variable_pool_for_single_node_run (
347- workflow = workflow ,
348- node_id = node_id ,
349- user_inputs = user_inputs ,
350- graph_runtime_state = graph_runtime_state ,
351- node_type_filter_key = "loop_id" ,
352- node_type_label = "loop" ,
353- )
354-
355321 def _handle_event (self , workflow_entry : WorkflowEntry , event : GraphEngineEvent ):
356322 """
357323 Handle event
0 commit comments