Zipstack / unstract

No-code LLM Platform to launch APIs and ETL Pipelines to structure unstructured documents
https://unstract.com
GNU Affero General Public License v3.0
352 stars 29 forks source link

Workflow: tool cannot run #419

Open haluwong opened 1 week ago

haluwong commented 1 week ago

version: v0.70.2

Created project in prompt studio and working fine, exported as tool successfully Then, try to create a simple workflow input (API), added the exported tools and output (API)

Try to "Start step execution" then it show the following error:

17:48:10
COMPILE
Compiling workflow 'b720b340-d052-4211-90a9-7f523f8fab9a' of 1 steps
17:48:11
COMPILE
Workflow 'b720b340-d052-4211-90a9-7f523f8fab9a' is valid and is compiled successfully
17:48:11
BUILD
Building workflow 'b720b340-d052-4211-90a9-7f523f8fab9a' of 1 steps
17:48:11
BUILD
------ Building step 1/d94bc46d-d7e9-4601-9c3d-05d323db33af
17:48:12
BUILD
Total matched files: 1
17:48:13
BUILD
Building the tool d94bc46d-d7e9-4601-9c3d-05d323db33af now...
17:48:13
BUILD
Workflow built successfully. Built tools = 1
17:48:13
BUILD
Error processing file /data/api/mock_org/b720b340-d052-4211-90a9-7f523f8fab9a/2ebba9db-0d15-4873-b138-741fd97e5473/IEMS_FG_INV1E_PDF_197573FGINV1EQCONFIG583198985087307062024.pdf: AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
17:48:13
BUILD
Processing file IEMS_FG_INV1E_PDF_197573FGINV1EQCONFIG583198985087307062024.pdf
17:48:14
BUILD
Execution completed for 0 files out of 1

Run Workflow show the following error:

17:49:10
RUN
1
Executing step 1 with tool d94bc46d-d7e9-4601-9c3d-05d323db33af
1
1
17:49:10
BUILD
No entries found in cache, executing the tools
17:49:10
RUN
1
Tool exception raised for tool d94bc46d-d7e9-4601-9c3d-05d323db33af, check logs for more information
17:49:11
RUN
Error processing file /data/api/mock_org/b720b340-d052-4211-90a9-7f523f8fab9a/e4915ad3-352a-48c5-a13b-52c5ec218008/IEMS_FG_INV1E_PDF_197573FGINV1EQCONFIG583198985087307062024.pdf: Tool exception raised for tool d94bc46d-d7e9-4601-9c3d-05d323db33af, check logs for more information
17:49:11
RUN
Execution completed for 0 files out of 1

Where can I check the log?

chandrasekharan-zipstack commented 1 week ago

Hey @haluwong

Thanks for trying out the application! This is a known issue with v0.70.2 and its fixed through #415. We'll make a release soon with this fix. Make sure you re-export the prompt studio project as a tool with v0.70.3 and above

For errors related to workflow execution, you can refer the logs from unstract-backend and unstract-worker services usually.

docker compose logs backend
docker compose logs worker

In order to debug an individual tool which was run in a workflow better, try setting REMOVE_CONTAINER_ON_EXIT=False and re-run unstract-worker.

VikashPratheepan commented 1 week ago

Hi @haluwong ,

You can proceed with you testing by clicking "Run Workflow" button as shown in screenshot.

Pls do an upgrade by just running ./run-platform.sh --upgrade before trying the workflow.Thanks!

run_workflow

haluwong commented 1 week ago

Thanks for the reply. I downloaded the latest branch and try to add [REMOVE_CONTAINER_ON_EXIT=False in unstract-worker.

Attached with the docker log for unstract-tool-structure-xxxxx seems missing some modules which cause the docker exited

_unstract-tool-structure-ff8fadd3-e622-47ef-b994-d4abd9e83480_logs.txt

image

chandrasekharan-zipstack commented 1 week ago

Yes @haluwong, this was this issue with unstract/tool-structure. If you're still seeing this import error it could be because in your backend/.env we've still configured to use this erroneous version

# Structure Tool
STRUCTURE_TOOL_IMAGE_URL="docker:unstract/tool-structure:0.0.25"
STRUCTURE_TOOL_IMAGE_NAME="unstract/tool-structure"
STRUCTURE_TOOL_IMAGE_TAG="0.0.25"

Please update this env to the below config and re-export the prompt studio project

# Structure Tool
STRUCTURE_TOOL_IMAGE_URL="docker:unstract/tool-structure:0.0.26"
STRUCTURE_TOOL_IMAGE_NAME="unstract/tool-structure"
STRUCTURE_TOOL_IMAGE_TAG="0.0.26"