EmbedAI icon indicating copy to clipboard operation
EmbedAI copied to clipboard

Error getting data

Open swapatel06 opened this issue 1 year ago • 10 comments

I'm facing an issue after uploading the document and successfully ingesting the data. When I send a message in the prompt it says Error getting data and i get no response. The server side terminal displays this -

127.0.0.1 - - [26/May/2023 16:13:19] "OPTIONS /get_answer HTTP/1.1" 200 - Using embedded DuckDB with persistence: data will be stored in: db/ 127.0.0.1 - - [26/May/2023 16:13:20] "POST /get_answer HTTP/1.1" 400 -

swapatel06 avatar May 26 '23 10:05 swapatel06

Do you observe any other errors ?

Also what is the configuration of your system ? It needs 16 GB of RAM, otherwise the process might get killed

Anil-matcha avatar May 26 '23 11:05 Anil-matcha

I found this in the console by inspecting the webpage. I have 64gb RAM and high end processor too. I don't think hardware will be the issue.

Warning: Each child in a list should have a unique "key" prop.

Check the render method of MainContainer. See https://reactjs.org/link/warning-keys for more information. at eval (webpack-internal:///(app-client)/./node_modules/react-bootstrap/esm/Stack.js:15:7) at MainContainer (webpack-internal:///(app-client)/./components/MainContainer.js:22:76) at div at eval (webpack-internal:///(app-client)/./node_modules/react-bootstrap/esm/Col.js:65:8) at div at eval (webpack-internal:///(app-client)/./node_modules/react-bootstrap/esm/Row.js:13:3) at Home at InnerLayoutRouter (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/layout-router.js:227:11) at RedirectErrorBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/redirect-boundary.js:73:9) at RedirectBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/redirect-boundary.js:81:11) at NotFoundBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/not-found-boundary.js:59:11) at LoadingBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/layout-router.js:332:11) at ErrorBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/error-boundary.js:106:11) at InnerScrollAndFocusHandler (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/layout-router.js:139:9) at ScrollAndFocusHandler (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/layout-router.js:213:11) at RenderFromTemplateContext (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/render-from-template-context.js:15:44) at OuterLayoutRouter (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/layout-router.js:342:11) at body at html at RedirectErrorBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/redirect-boundary.js:73:9) at RedirectBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/redirect-boundary.js:81:11) at NotFoundErrorBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/not-found-boundary.js:51:9) at NotFoundBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/not-found-boundary.js:59:11) at ReactDevOverlay (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/ReactDevOverlay.js:66:9) at HotReload (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js:276:11) at Router (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/app-router.js:90:11) at ErrorBoundaryHandler (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/error-boundary.js:80:9) at ErrorBoundary (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/error-boundary.js:106:11) at AppRouter (webpack-internal:///(app-client)/./node_modules/next/dist/client/components/app-router.js:374:13) at ServerRoot (webpack-internal:///(app-client)/./node_modules/next/dist/client/app-index.js:154:11) at RSCComponent at Root (webpack-internal:///(app-client)/./node_modules/next/dist/client/app-index.js:171:11) window.console.error @ app-index.js:32 console.error @ hydration-error-info.js:45 printWarning @ react-jsx-dev-runtime.development.js:89 error @ react-jsx-dev-runtime.development.js:63 validateExplicitKey @ react-jsx-dev-runtime.development.js:1092 validateChildKeys @ react-jsx-dev-runtime.development.js:1119 jsxWithValidation @ react-jsx-dev-runtime.development.js:1285 MainContainer @ MainContainer.js:62 renderWithHooks @ react-dom.development.js:10648 updateFunctionComponent @ react-dom.development.js:15175 beginWork$1 @ react-dom.development.js:17320 beginWork @ react-dom.development.js:25650 performUnitOfWork @ react-dom.development.js:24501 workLoopSync @ react-dom.development.js:24217 renderRootSync @ react-dom.development.js:24182 performSyncWorkOnRoot @ react-dom.development.js:23677 flushSyncWorkAcrossRoots_impl @ react-dom.development.js:9965 flushSyncWorkOnAllRoots @ react-dom.development.js:9923 processRootScheduleInMicrotask @ react-dom.development.js:10067 eval @ react-dom.development.js:10238 MainContainer.js:29 POST http://localhost:5000/get_answer 400 (BAD REQUEST)

swapatel06 avatar May 26 '23 12:05 swapatel06

@swapatel06 This can happen when the model is not downloaded. Can you download the model by clicking on "Download model" in the UI. Model size is 3.2 GB and can take some time to download. Once done, you will be able to do queries to your data

Anil-matcha avatar May 26 '23 12:05 Anil-matcha

I have manually downloaded the model from https://huggingface.co/orel12/ggml-gpt4all-j-v1.3-groovy/tree/main And i've put it in the server folder inside models/ folder. When i click on Download it displays Download Complete. It uploads the document and Ingests successfully. This is the console log from inspect tab

{response: 'Download completed'} ConfigSideNav.js:77 {response: 'Document upload successful'} ConfigSideNav.js:23 {response: 'Success'}

And then this error app-index.js:32 Warning: Each child in a list should have a unique "key" prop.

swapatel06 avatar May 26 '23 12:05 swapatel06

From the client side, it doesn't look like there is any error. Warning is not an error and can be ignored

But from the server side it is possible the model is not being run well on the system. Which OS are you using ? And can you check the errors on server terminal

Anil-matcha avatar May 26 '23 12:05 Anil-matcha

I'm using centos 7 and there is just this is the only log on the server terminal

127.0.0.1 - - [26/May/2023 18:06:44] "OPTIONS /get_answer HTTP/1.1" 200 - Using embedded DuckDB with persistence: data will be stored in: db/ 127.0.0.1 - - [26/May/2023 18:06:44] "POST /get_answer HTTP/1.1" 400 -

swapatel06 avatar May 26 '23 12:05 swapatel06

Have added now error messages on the client side to indicate what the error was instead of a generic unable to answer message. From what I see it looks like it is unable to find the model but you can check once on your system

Anil-matcha avatar May 26 '23 13:05 Anil-matcha

Actually i retried everything and I realized that when i start the server with the models/ folder inside server directory it gives me the error Illegal instruction(core dumped)

And the server starts up without the models/ folder and then copy/pasting the model was making it work. But due to this it generates no errors and still doesn't work.

I'll be following these threads for now which are regarding this Illegal instruction issue https://github.com/imartinez/privateGPT/issues/203 https://github.com/imartinez/privateGPT/issues/326

swapatel06 avatar May 26 '23 14:05 swapatel06

Looks like an issue with model compatibility with the OS. Keeping this thread until a solution is found

Anil-matcha avatar May 26 '23 14:05 Anil-matcha

same problem.127.0.0.1 - - "POST /get_answer HTTP/1.1" 400 -

Jiashisoft avatar May 27 '23 17:05 Jiashisoft

The issue was because it requires avx2 support on the cpu. I just used another system for it which had avx2 support it works fine. Also for those who don't have avx2 support on the cpu may refer to this thread. https://github.com/nomic-ai/pygpt4all/issues/71

swapatel06 avatar May 29 '23 09:05 swapatel06

@swapatel06 Thanks for sharing

Anil-matcha avatar May 29 '23 09:05 Anil-matcha

问题是因为它需要 cpu 上的 avx2 支持。我只是为它使用了另一个支持 avx2 的系统,它工作正常。 对于那些在 cpu 上没有 avx2 支持的人也可以参考这个线程。 nomic-ai/pygpt4all#71

The cpu of my server supports AVX2, but the same error is reported, so strange

ZimaBlueee avatar Jun 11 '23 16:06 ZimaBlueee