@@ -585,15 +585,17 @@ def process_benchmark_row(row: Dict[str, Any]) -> Dict[str, Any]:
585585 input_message = QUERY_TEMPLATE .format (question = problem )
586586
587587 if isinstance (pipeline_template , (ChatAgent )):
588- pipeline = pipeline_template .clone () # type: ignore[assignment]
588+ chat_pipeline = pipeline_template .clone ()
589589
590- response_text = pipeline .step (
590+ response_text = chat_pipeline .step (
591591 input_message , response_format = QueryResponse
592592 )
593593 elif isinstance (pipeline_template , Workforce ):
594- pipeline = pipeline_template .clone () # type: ignore[assignment]
594+ workforce_pipeline = asyncio . run ( pipeline_template .clone ())
595595 task = Task (content = input_message , id = "0" )
596- task = asyncio .run (pipeline .process_task_async (task )) # type: ignore[attr-defined]
596+ task = asyncio .run (
597+ workforce_pipeline .process_task_async (task )
598+ ) # type: ignore[attr-defined]
597599 if task_json_formatter :
598600 formatter_in_process = task_json_formatter .clone ()
599601 else :
@@ -607,16 +609,16 @@ def process_benchmark_row(row: Dict[str, Any]) -> Dict[str, Any]:
607609
608610 elif isinstance (pipeline_template , RolePlaying ):
609611 # RolePlaying is different.
610- pipeline = pipeline_template .clone ( # type: ignore[assignment]
612+ rp_pipeline = pipeline_template .clone (
611613 task_prompt = input_message
612614 )
613615
614616 n = 0
615- input_msg = pipeline .init_chat () # type: ignore[attr-defined]
617+ input_msg = rp_pipeline .init_chat ()
616618 chat_history = []
617619 while n < chat_turn_limit :
618620 n += 1
619- assistant_response , user_response = pipeline .step (
621+ assistant_response , user_response = rp_pipeline .step (
620622 input_msg
621623 )
622624 if assistant_response .terminated : # type: ignore[union-attr]
0 commit comments