Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failue in 'build_index_tool': Unsupported File Type #192

Open
WilliamWatsonEAI opened this issue Jul 29, 2024 · 0 comments
Open

Comments

@WilliamWatsonEAI
Copy link

Please can you help me to resolve this issue when Executing the prompt flow bulk run in the chat_with_pdf_ci_dev_workflow. I have searched exhaustively for a solution and cannot seem to determine what is going wrong. I have followed the workshop guide, FAQ and "working with github flows".

Apologies if this is not the correct forum for such a request but there is no instructions provided for getting support (https://github.com/microsoft/llmops-promptflow-template/blob/main/SUPPORT.md) and I am really stumped/cannot successfully deploy the LLMOPS template.

Below is a summary of my issue, with sensitive information redacted:

Run Summary

Run Details

  • Run name: chat_with_pdf_20240729_140552_chat_with_pdf
  • Run status: Completed
  • Start time: 2024-07-29 14:06:19.212003+00:00
  • Duration: 0:00:14.572418
  • Run URL: Run Details

Run Metadata

  • Name: chat_with_pdf_20240729_140552_chat_with_pdf
  • Created on: 2024-07-29T14:06:00.889680+00:00
  • Status: Completed
  • Display name: chat_with_pdf_20240729_140552_chat_with_pdf
  • Description:
  • Tags:
    • build_id: 10145832774
  • Properties:
    • azureml.promptflow.inputs_mapping: "math_question":"$data.question"
    • azureml.promptflow.runtime_name: automatic
    • azureml.promptflow.disable_trace: false
    • azureml.promptflow.session_id: c830a1b9a46730b77d57609a907e090cd91115d88070f2ee
    • azureml.promptflow.definition_file_name: flow.dag.yaml
    • azureml.promptflow.flow_lineage_id: d3534c65e5ee3a6a559789ba7cebd698fd2a289546e6aec92b4f5d23c8c1fe34
    • azureml.promptflow.flow_definition_datastore_name: workspaceblobstore
    • azureml.promptflow.flow_definition_blob_path: LocalUpload/216811aaf8dfdf1f9ca6148b99925b0a/standard/flow.dag.yaml
    • _azureml.evaluation_run: promptflow.BatchRun
    • azureml.promptflow.snapshot_id: 929e78db-5284-423a-86a5-67bff901a3db
    • azureml.promptflow.runtime_version: 20240709.v1
    • _azureml.evaluate_artifacts: [{"path": "instance_results.jsonl", "type": "table"}]
    • azureml.promptflow.total_tokens: 308
    • azureml.promptflow.completion_tokens: 9
    • azureml.promptflow.prompt_tokens: 299

Creation Context

  • User Object ID: [REDACTED]
  • User PU ID: [REDACTED]
  • User IDP: [REDACTED]
  • User Alt Sec ID: [REDACTED]
  • User Issuer: [REDACTED]
  • User Tenant ID: [REDACTED]
  • User Name: [REDACTED]
  • UPN: [REDACTED]

Timing

  • Start time: 2024-07-29T14:06:19.212003+00:00
  • End time: 2024-07-29T14:06:33.784421+00:00
  • Duration: 00:00:14.5724183

Portal URL

Data

  • Data: azureml:chat_with_pdf:2
  • Output: azureml://locations/australiaeast/workspaces/[REDACTED]/data/azureml_chat_with_pdf_20240729_140552_chat_with_pdf_output_data_flow_outputs/versions/1

Error

  • Code: UserError
  • Severity:
  • Message: Execution failure in 'build_index_tool': (BadRequestError) Unsupported data type
  • Message Format: "totalChildRuns": 1, "userErrorChildRuns": 1, "systemErrorChildRuns": 0, "errorDetails": [{"code": "UserError/ToolExecutionError", "messageFormat": "Execution failure in 'node_name'.", "count": 1}]
  • Message Parameters:
    • Node Name: build_index_tool
  • Reference Code: Tool/__pf_main__
  • Details URI:
  • Target:
  • Details: []
  • Inner Error:
    • Code: ToolExecutionError
    • Inner Error:
  • Debug Info:
    • Type: ToolExecutionError
    • Message: Execution failure in 'build_index_tool': (BadRequestError) Unsupported data type
    • Stack Trace:
      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 182, in _invoke_tool_inner
          return f(**kwargs)
        File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/tracing/_trace.py", line 556, in wrapped
          output = func(*args, **kwargs)
        File "/mnt/host/service/app/37099/requests/chat_with_pdf_20240729_140552_chat_with_pdf/build_index_tool.py", line 9, in build_index_tool
          return create_faiss_index(pdf_path)
        File "/mnt/host/service/app/37099/requests/chat_with_pdf_20240729_140552_chat_with_pdf/chat_with_pdf/build_index.py", line 57, in create_faiss_index
          index.insert_batch(segments)
        File "/mnt/host/service/app/37099/requests/chat_with_pdf_20240729_140552_chat_with_pdf/chat_with_pdf/utils/index.py", line 39, in insert_batch
          vector = self.embedding.generate(text)
        File "/mnt/host/service/app/37099/requests/chat_with_pdf_20240729_140552_chat_with_pdf/chat_with_pdf/utils/retry.py", line 21, in wrapper
          return func(*args, **kwargs)
        File "/mnt/host/service/app/37099/requests/chat_with_pdf_20240729_140552_chat_with_pdf/chat_with_pdf/utils/oai.py", line 119, in generate
          return self.client.embeddings.create(
        File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/openai/resources/embeddings.py", line 114, in create
          return self._post(
        File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/openai/_base_client.py", line 1266, in post
          return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
        File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/openai/_base_client.py", line 942, in request
          return self._request(
        File "/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/openai/_base_client.py", line 1046, in _request
          raise self._make_status_error_from_response(err.response) from None
      openai.BadRequestError: Unsupported data type
      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant