Issue with Azure Promptflow API Deployment Functionality
Pratya Thanwatthanakit
5
Reputation points
Today, there seems to be an issue with Azure Promptflow deployment. API deployment is not functioning properly, but the Promptflow chat in the Dev Studio is still responding as expected.
error log:
2024-12-18 08:55:24 +0000 22 execution ERROR Node w1_categorize in line None failed. Exception: Execution failure in 'w1_categorize': (TypeError) unsupported operand type(s) for +: 'int' and 'dict'.
Traceback (most recent call last):
File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/_core/flow_execution_context.py", line 182, in _invoke_tool_inner
return f(**kwargs)
File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 562, in wrapped
token_collector.collect_openai_tokens_for_parent_span(span)
File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 143, in collect_openai_tokens_for_parent_span
merged_tokens = {
File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 145, in <dictcomp>
key: (self._span_id_to_tokens[parent_span_id].get(key, 0) or 0) + (tokens.get(key, 0) or 0)
TypeError: unsupported operand type(s) for +: 'int' and 'dict'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/_core/flow_execution_context.py", line 90, in invoke_tool
result = self._invoke_tool_inner(node, f, kwargs)
File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/_core/flow_execution_context.py", line 206, in _invoke_tool_inner
raise ToolExecutionError(node_name=node_name, module=module) from e
promptflow._core._errors.ToolExecutionError: Execution failure in 'w1_categorize': (TypeError) unsupported operand type(s) for +: 'int' and 'dict'
2024-12-18 08:55:24 +0000 22 execution.flow WARNING Failed to calculate metrics due to exception: unsupported operand type(s) for +: 'int' and 'dict'.
2024-12-18 08:55:24 +0000 22 execution.flow ERROR Flow execution has failed. Cancelling all running nodes: w1_categorize.
[2024-12-18 08:55:24 +0000][pfserving-app][ERROR] - Flow run failed with error: {'message': "Execution failure in 'w1_categorize': (TypeError) unsupported operand type(s) for +: 'int' and 'dict'", 'messageFormat': "Execution failure in '{node_name}'.", 'messageParameters': {'node_name': 'w1_categorize'}, 'referenceCode': 'Tool/promptflow.tools.aoai', 'code': 'UserError', 'innerError': {'code': 'ToolExecutionError', 'innerError': None}, 'additionalInfo': [{'type': 'ToolExecutionErrorDetails', 'info': {'type': 'TypeError', 'message': "unsupported operand type(s) for +: 'int' and 'dict'", 'traceback': 'Traceback (most recent call last):\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 562, in wrapped\n token_collector.collect_openai_tokens_for_parent_span(span)\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 143, in collect_openai_tokens_for_parent_span\n merged_tokens = {\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 145, in <dictcomp>\n key: (self._span_id_to_tokens[parent_span_id].get(key, 0) or 0) + (tokens.get(key, 0) or 0)\nTypeError: unsupported operand type(s) for +: \'int\' and \'dict\'\n', 'filename': '/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py', 'lineno': 145, 'name': '<dictcomp>'}}], 'debugInfo': {'type': 'ToolExecutionError', 'message': "Execution failure in 'w1_categorize': (TypeError) unsupported operand type(s) for +: 'int' and 'dict'", 'stackTrace': '\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/flow_executor.py", line 1034, in _exec\n output, aggregation_inputs = self._exec_inner_with_trace(\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/flow_executor.py", line 937, in _exec_inner_with_trace\n output, nodes_outputs = self._traverse_nodes(inputs, context)\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/flow_executor.py", line 1215, in _traverse_nodes\n nodes_outputs, bypassed_nodes = self._submit_to_scheduler(context, inputs, batch_nodes)\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/flow_executor.py", line 1270, in _submit_to_scheduler\n return scheduler.execute(self._line_timeout_sec)\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/_flow_nodes_scheduler.py", line 131, in execute\n raise e\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/_flow_nodes_scheduler.py", line 113, in execute\n self._dag_manager.complete_nodes(self._collect_outputs(completed_futures))\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/_flow_nodes_scheduler.py", line 160, in _collect_outputs\n each_node_result = each_future.result()\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/concurrent/futures/_base.py", line 439, in result\n return self.__get_result()\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result\n raise self._exception\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/concurrent/futures/thread.py", line 58, in run\n result = self.fn(*self.args, **self.kwargs)\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/_flow_nodes_scheduler.py", line 181, in _exec_single_node_in_thread\n result = context.invoke_tool(node, f, kwargs=kwargs)\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/_core/flow_execution_context.py", line 90, in invoke_tool\n result = self._invoke_tool_inner(node, f, kwargs)\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/_core/flow_execution_context.py", line 206, in _invoke_tool_inner\n raise ToolExecutionError(node_name=node_name, module=module) from e\n', 'innerException': {'type': 'TypeError', 'message': "unsupported operand type(s) for +: 'int' and 'dict'", 'stackTrace': 'Traceback (most recent call last):\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/_core/flow_execution_context.py", line 182, in _invoke_tool_inner\n return f(**kwargs)\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 562, in wrapped\n token_collector.collect_openai_tokens_for_parent_span(span)\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 143, in collect_openai_tokens_for_parent_span\n merged_tokens = {\n File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 145, in <dictcomp>\n key: (self._span_id_to_tokens[parent_span_id].get(key, 0) or 0) + (tokens.get(key, 0) or 0)\n', 'innerException': None}}}
[2024-12-18 08:55:24 +0000][pfserving-app][INFO] - Finish monitoring request, request_id: f496fced-17cc-43f0-9c51-7aabc8490ef3, client_request_id: f496fced-17cc-43f0-9c51-7aabc8490ef3.
Sign in to answer