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

Problem in vector DB. #11

Open
afzaale01 opened this issue Dec 4, 2024 · 2 comments · May be fixed by #18
Open

Problem in vector DB. #11

afzaale01 opened this issue Dec 4, 2024 · 2 comments · May be fixed by #18
Assignees

Comments

@afzaale01
Copy link

afzaale01 commented Dec 4, 2024

image

qdrant | 2024-12-04T07:09:33.108269Z INFO actix_web::middleware::logger: 172.18.0.5 "GET /collections/mnm_storage HTTP/1.1" 200 439 "-"
"python-httpx/0.27.2" 0.000300
minima-llm-1 | INFO:httpx:HTTP Request: GET http://qdrant:6333/collections/mnm_storage "HTTP/1.1 200 OK"
minima-llm-1 | INFO:minima_embed:Requesting data from indexer with query: dummy_text
minima-llm-1 | ERROR:minima_embed:HTTP error: HTTPConnectionPool(host='indexer', port=8000): Max retries exceeded with url: /embedding (Caused
by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f202c29fd00>: Failed to establish a new connection: [Errno 111] Connection refused'))
minima-llm-1 | ERROR:minima_embed:Error in embedding: HTTPConnectionPool(host='indexer', port=8000): Max retries exceeded with url: /embedding
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f202c29fd00>: Failed to establish a new connection: [Errno 111] Connection refused'))
minima-llm-1 | INFO: ('172.18.0.1', 49356) - "WebSocket /llm/" [accepted]
minima-llm-1 | INFO: connection open
minima-llm-1 | ERROR: Exception in ASGI application
minima-llm-1 | Traceback (most recent call last):
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 242, in run_asgi
minima-llm-1 | result = await self.app(self.scope, self.asgi_receive, self.asgi_send) # type: ignore[func-returns-value]
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
minima-llm-1 | return await self.app(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 1054, in call
minima-llm-1 | await super().call(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 123, in call
minima-llm-1 | await self.middleware_stack(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 151, in call
minima-llm-1 | await self.app(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 65, in call
minima-llm-1 | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
minima-llm-1 | raise exc
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
minima-llm-1 | await app(scope, receive, sender)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 756, in call
minima-llm-1 | await self.middleware_stack(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 776, in app
minima-llm-1 | await route.handle(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 373, in handle
minima-llm-1 | await self.app(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 96, in app
minima-llm-1 | await wrap_app_handling_exceptions(app, session)(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
minima-llm-1 | raise exc
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
minima-llm-1 | await app(scope, receive, sender)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 94, in app
minima-llm-1 | await func(session)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 348, in app
minima-llm-1 | await dependant.call(**values)
minima-llm-1 | File "/usr/src/app/app.py", line 27, in chat_client
minima-llm-1 | await asyncio.gather(
minima-llm-1 | File "/usr/src/app/async_question_to_answer.py", line 15, in loop
minima-llm-1 | llm_chain = LLMChain()
minima-llm-1 | File "/usr/src/app/llm_chain.py", line 74, in init
minima-llm-1 | self.document_store = self._setup_document_store()
minima-llm-1 | File "/usr/src/app/llm_chain.py", line 90, in _setup_document_store
minima-llm-1 | return QdrantVectorStore(
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 213, in init
minima-llm-1 | self._validate_collection_config(
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 1050, in _validate_collection_config
minima-llm-1 | cls._validate_collection_for_dense(
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 1109, in _validate_collection_for_dense
minima-llm-1 | vector_size = len(dense_embeddings.embed_documents(["dummy_text"])[0])
minima-llm-1 | IndexError: list index out of range
minima-llm-1 | INFO:llm:Client disconnected
minima-llm-1 | INFO: connection closed
qdrant | 2024-12-04T07:09:33.149062Z INFO actix_web::middleware::logger: 172.18.0.5 "GET /collections/mnm_storage HTTP/1.1" 200 438 "-"
"python-httpx/0.27.2" 0.000327
minima-llm-1 | INFO:httpx:HTTP Request: GET http://qdrant:6333/collections/mnm_storage "HTTP/1.1 200 OK"
minima-llm-1 | INFO:minima_embed:Requesting data from indexer with query: dummy_text
minima-llm-1 | ERROR:minima_embed:HTTP error: HTTPConnectionPool(host='indexer', port=8000): Max retries exceeded with url: /embedding (Caused
by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f202c157850>: Failed to establish a new connection: [Errno 111] Connection refused'))
minima-llm-1 | ERROR:minima_embed:Error in embedding: HTTPConnectionPool(host='indexer', port=8000): Max retries exceeded with url: /embedding
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f202c157850>: Failed to establish a new connection: [Errno 111] Connection refused'))
minima-llm-1 | INFO: ('172.18.0.1', 49364) - "WebSocket /llm/" [accepted]
minima-llm-1 | INFO: connection open
minima-llm-1 | ERROR: Exception in ASGI application
minima-llm-1 | Traceback (most recent call last):
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 242, in run_asgi
minima-llm-1 | result = await self.app(self.scope, self.asgi_receive, self.asgi_send) # type: ignore[func-returns-value]
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
minima-llm-1 | return await self.app(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 1054, in call
minima-llm-1 | await super().call(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 123, in call
minima-llm-1 | await self.middleware_stack(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 151, in call
minima-llm-1 | await self.app(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 65, in call
minima-llm-1 | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
minima-llm-1 | raise exc
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
minima-llm-1 | await app(scope, receive, sender)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 756, in call
minima-llm-1 | await self.middleware_stack(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 776, in app
minima-llm-1 | await route.handle(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 373, in handle
minima-llm-1 | await self.app(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 96, in app
minima-llm-1 | await wrap_app_handling_exceptions(app, session)(scope, receive, send)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
minima-llm-1 | raise exc
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
minima-llm-1 | await app(scope, receive, sender)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 94, in app
minima-llm-1 | await func(session)
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 348, in app
minima-llm-1 | await dependant.call(**values)
minima-llm-1 | File "/usr/src/app/app.py", line 27, in chat_client
minima-llm-1 | await asyncio.gather(
minima-llm-1 | File "/usr/src/app/async_question_to_answer.py", line 15, in loop
minima-llm-1 | llm_chain = LLMChain()
minima-llm-1 | File "/usr/src/app/llm_chain.py", line 74, in init
minima-llm-1 | self.document_store = self._setup_document_store()
minima-llm-1 | File "/usr/src/app/llm_chain.py", line 90, in _setup_document_store
minima-llm-1 | return QdrantVectorStore(
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 213, in init
minima-llm-1 | self._validate_collection_config(
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 1050, in _validate_collection_config
minima-llm-1 | cls._validate_collection_for_dense(
minima-llm-1 | File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 1109, in _validate_collection_for_dense
minima-llm-1 | vector_size = len(dense_embeddings.embed_documents(["dummy_text"])[0])
minima-llm-1 | IndexError: list index out of range
minima-llm-1 | INFO:llm:Client disconnected
minima-llm-1 | INFO: connection closed

@dmayboroda
Copy link
Owner

Hi @afzaale01
Thank you so much for the issue
That sometimes happens, I'll fix it
For now, what you can do, is just try to launch all containers and when you'll see that issues again, please restart indexer container, and try to establish a chat connection

I'll prepare a fix ASAP
Thank you!

@pshenok pshenok linked a pull request Dec 23, 2024 that will close this issue
@sealad886
Copy link

I'm getting a similar error, but it's happening earlier. I think this occurs here (indexer-1 line marked):

Attaching to chat-1, indexer-1, llm-1, ollama, qdrant
ollama     | 2024/12/30 19:33:35 routes.go:1259: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/root/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]"
qdrant     |            _                 _    
qdrant     |   __ _  __| |_ __ __ _ _ __ | |_  
qdrant     |  / _` |/ _` | '__/ _` | '_ \| __| 
qdrant     | | (_| | (_| | | | (_| | | | | |_  
qdrant     |  \__, |\__,_|_|  \__,_|_| |_|\__| 
qdrant     |     |_|                           
qdrant     | 
qdrant     | Version: 1.12.5, build: 27260abd
qdrant     | Access web UI at http://localhost:6333/dashboard
qdrant     | 
ollama     | time=2024-12-30T19:33:35.471Z level=INFO source=images.go:757 msg="total blobs: 6"
ollama     | time=2024-12-30T19:33:35.488Z level=INFO source=images.go:764 msg="total unused blobs removed: 0"
qdrant     | 2024-12-30T19:33:35.487061Z  INFO storage::content_manager::consensus::persistent: Initializing new raft state at ./storage/raft_state.json    
ollama     | [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
ollama     | 
ollama     | [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
ollama     |  - using env:	export GIN_MODE=release
ollama     |  - using code:	gin.SetMode(gin.ReleaseMode)
ollama     | 
ollama     | time=2024-12-30T19:33:35.497Z level=INFO source=routes.go:1310 msg="Listening on [::]:11434 (version 0.5.4-0-g2ddc32d-dirty)"
ollama     | [GIN-debug] POST   /api/pull                 --> github.com/ollama/ollama/server.(*Server).PullHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /api/generate             --> github.com/ollama/ollama/server.(*Server).GenerateHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /api/chat                 --> github.com/ollama/ollama/server.(*Server).ChatHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /api/embed                --> github.com/ollama/ollama/server.(*Server).EmbedHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /api/embeddings           --> github.com/ollama/ollama/server.(*Server).EmbeddingsHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /api/create               --> github.com/ollama/ollama/server.(*Server).CreateHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /api/push                 --> github.com/ollama/ollama/server.(*Server).PushHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /api/copy                 --> github.com/ollama/ollama/server.(*Server).CopyHandler-fm (5 handlers)
ollama     | [GIN-debug] DELETE /api/delete               --> github.com/ollama/ollama/server.(*Server).DeleteHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /api/show                 --> github.com/ollama/ollama/server.(*Server).ShowHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /api/blobs/:digest        --> github.com/ollama/ollama/server.(*Server).CreateBlobHandler-fm (5 handlers)
ollama     | [GIN-debug] HEAD   /api/blobs/:digest        --> github.com/ollama/ollama/server.(*Server).HeadBlobHandler-fm (5 handlers)
ollama     | [GIN-debug] GET    /api/ps                   --> github.com/ollama/ollama/server.(*Server).PsHandler-fm (5 handlers)
ollama     | [GIN-debug] POST   /v1/chat/completions      --> github.com/ollama/ollama/server.(*Server).ChatHandler-fm (6 handlers)
ollama     | [GIN-debug] POST   /v1/completions           --> github.com/ollama/ollama/server.(*Server).GenerateHandler-fm (6 handlers)
ollama     | [GIN-debug] POST   /v1/embeddings            --> github.com/ollama/ollama/server.(*Server).EmbedHandler-fm (6 handlers)
ollama     | [GIN-debug] GET    /v1/models                --> github.com/ollama/ollama/server.(*Server).ListHandler-fm (6 handlers)
ollama     | [GIN-debug] GET    /v1/models/:model         --> github.com/ollama/ollama/server.(*Server).ShowHandler-fm (6 handlers)
ollama     | [GIN-debug] GET    /                         --> github.com/ollama/ollama/server.(*Server).GenerateRoutes.func1 (5 handlers)
ollama     | [GIN-debug] GET    /api/tags                 --> github.com/ollama/ollama/server.(*Server).ListHandler-fm (5 handlers)
ollama     | [GIN-debug] GET    /api/version              --> github.com/ollama/ollama/server.(*Server).GenerateRoutes.func2 (5 handlers)
ollama     | [GIN-debug] HEAD   /                         --> github.com/ollama/ollama/server.(*Server).GenerateRoutes.func1 (5 handlers)
ollama     | [GIN-debug] HEAD   /api/tags                 --> github.com/ollama/ollama/server.(*Server).ListHandler-fm (5 handlers)
ollama     | [GIN-debug] HEAD   /api/version              --> github.com/ollama/ollama/server.(*Server).GenerateRoutes.func2 (5 handlers)
ollama     | time=2024-12-30T19:33:35.501Z level=INFO source=routes.go:1339 msg="Dynamic LLM libraries" runners="[cpu cuda_jetpack5 cuda_jetpack6 cuda_v11 cuda_v12]"
ollama     | time=2024-12-30T19:33:35.508Z level=INFO source=gpu.go:226 msg="looking for compatible GPUs"
ollama     | time=2024-12-30T19:33:35.516Z level=INFO source=gpu.go:392 msg="no compatible GPUs were discovered"
ollama     | time=2024-12-30T19:33:35.516Z level=INFO source=types.go:131 msg="inference compute" id=0 library=cpu variant="no vector extensions" compute="" driver=0.0 name="" total="26.4 GiB" available="25.3 GiB"
qdrant     | 2024-12-30T19:33:35.529686Z  INFO qdrant: Distributed mode disabled    
qdrant     | 2024-12-30T19:33:35.530949Z  INFO qdrant: Telemetry reporting enabled, id: ba3dd253-af99-49a5-81b6-5b8c64c1f631    
qdrant     | 2024-12-30T19:33:35.533095Z  INFO qdrant: Inference service is not configured.    
qdrant     | 2024-12-30T19:33:35.609274Z  INFO qdrant::actix: TLS disabled for REST API    
qdrant     | 2024-12-30T19:33:35.609894Z  INFO qdrant::actix: Qdrant HTTP listening on 6333    
qdrant     | 2024-12-30T19:33:35.610249Z  INFO actix_server::builder: Starting 11 workers
qdrant     | 2024-12-30T19:33:35.610261Z  INFO actix_server::server: Actix runtime found; starting in Actix runtime
qdrant     | 2024-12-30T19:33:35.613475Z  INFO qdrant::tonic: Qdrant gRPC listening on 6334    
qdrant     | 2024-12-30T19:33:35.613490Z  INFO qdrant::tonic: TLS disabled for gRPC API    
indexer-1  | INFO:     Will watch for changes in these directories: ['/usr/src/app']
indexer-1  | INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
indexer-1  | INFO:     Started reloader process [6] using WatchFiles
llm-1      | INFO:     Will watch for changes in these directories: ['/usr/src/app']
llm-1      | INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
llm-1      | INFO:     Started reloader process [6] using WatchFiles
chat-1     | 
chat-1     | > [email protected] start
chat-1     | > react-scripts start
chat-1     | 
chat-1     | (node:25) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
chat-1     | (Use `node --trace-deprecation ...` to show where the warning was created)
chat-1     | (node:25) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
chat-1     | Starting the development server...
chat-1     | 
##
# >> indexer-1  | The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.
##
0it [00:00, ?it/s]
llm-1      | INFO:     Started server process [8]
llm-1      | INFO:     Waiting for application startup.
llm-1      | INFO:     Application startup complete.
indexer-1  | INFO:sentence_transformers.SentenceTransformer:Load pretrained SentenceTransformer: BAAI/bge-m3
chat-1     | One of your dependencies, babel-preset-react-app, is importing the
chat-1     | "@babel/plugin-proposal-private-property-in-object" package without
chat-1     | declaring it in its dependencies. This is currently working because
chat-1     | "@babel/plugin-proposal-private-property-in-object" is already in your
chat-1     | node_modules folder for unrelated reasons, but it may break at any time.
chat-1     | 
chat-1     | babel-preset-react-app is part of the create-react-app project, which
chat-1     | is not maintianed anymore. It is thus unlikely that this bug will
chat-1     | ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
chat-1     | your devDependencies to work around this error. This will make this message
chat-1     | go away.
chat-1     |   
qdrant     | 2024-12-30T19:33:42.255329Z  INFO actix_web::middleware::logger: 172.18.0.4 "GET /collections/mnm_storage/exists HTTP/1.1" 200 81 "-" "python-httpx/0.28.1" 0.003668    
indexer-1  | INFO:httpx:HTTP Request: GET http://qdrant:6333/collections/mnm_storage/exists "HTTP/1.1 200 OK"
qdrant     | 2024-12-30T19:33:42.269189Z  INFO storage::content_manager::toc::collection_meta_ops: Creating collection mnm_storage    
qdrant     | 2024-12-30T19:33:42.423406Z  INFO actix_web::middleware::logger: 172.18.0.4 "PUT /collections/mnm_storage HTTP/1.1" 200 71 "-" "python-httpx/0.28.1" 0.160155    
indexer-1  | INFO:httpx:HTTP Request: PUT http://qdrant:6333/collections/mnm_storage "HTTP/1.1 200 OK"
qdrant     | 2024-12-30T19:33:42.427971Z  INFO actix_web::middleware::logger: 172.18.0.4 "GET /collections/mnm_storage HTTP/1.1" 200 439 "-" "python-httpx/0.28.1" 0.002515    
indexer-1  | INFO:httpx:HTTP Request: GET http://qdrant:6333/collections/mnm_storage "HTTP/1.1 200 OK"
ollama     | [GIN] 2024/12/30 - 19:33:45 | 200 |    1.464292ms |       127.0.0.1 | HEAD     "/"
pulling manifest 
ollama     | pulling 0ba5c285c16b... 100% ▕████████████████▏ 2.6 GB                         
ollama     | pulling 966de95ca8a6... 100% ▕████████████████▏ 1.4 KB                         
ollama     | pulling fcc5a6bec9da... 100% ▕████████████████▏ 7.7 KB                         
ollama     | pulling a70ff7e570d9... 100% ▕████████████████▏ 6.0 KB                         
ollama     | pulling 56bb8bd477a5... 100% ▕████████████████▏   96 B                         
ollama     | pulling cc88376befda... 100% ▕████████████████▏  559 B                         
ollama     | verifying sha256 digest 
ollama     | writing manifest 
ollama     | success 
ollama     | [GIN] 2024/12/30 - 19:33:46 | 200 |  702.619417ms |       127.0.0.1 | POST     "/api/pull"
chat-1     | Compiled successfully!
chat-1     | 
chat-1     | You can now view chat in the browser.
chat-1     | 
chat-1     |   Local:            http://localhost:3000
chat-1     |   On Your Network:  http://172.18.0.6:3000
chat-1     | 
chat-1     | Note that the development build is not optimized.
chat-1     | To create a production build, use npm run build.
chat-1     | 
chat-1     | webpack compiled successfully
chat-1     | Compiling...
chat-1     | Compiled successfully!
chat-1     | webpack compiled successfully
indexer-1  | Process SpawnProcess-1:
indexer-1  | Traceback (most recent call last):
indexer-1  |   File "/usr/local/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
indexer-1  |     self.run()
indexer-1  |   File "/usr/local/lib/python3.9/multiprocessing/process.py", line 108, in run
indexer-1  |     self._target(*self._args, **self._kwargs)
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
indexer-1  |     target(sockets=sockets)
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 66, in run
indexer-1  |     return asyncio.run(self.serve(sockets=sockets))
indexer-1  |   File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
indexer-1  |     return loop.run_until_complete(main)
indexer-1  |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
indexer-1  |     return future.result()
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 70, in serve
indexer-1  |     await self._serve(sockets)
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 77, in _serve
indexer-1  |     config.load()
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/config.py", line 435, in load
indexer-1  |     self.loaded_app = import_from_string(self.app)
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/importer.py", line 19, in import_from_string
indexer-1  |     module = importlib.import_module(module_str)
indexer-1  |   File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
indexer-1  |     return _bootstrap._gcd_import(name[level:], package, level)
indexer-1  |   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
indexer-1  |   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
indexer-1  |   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
indexer-1  |   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
indexer-1  |   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
indexer-1  |   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
indexer-1  |   File "/usr/src/app/app.py", line 16, in <module>
indexer-1  |     indexer = Indexer()
indexer-1  |   File "/usr/src/app/indexer.py", line 60, in __init__
indexer-1  |     self.document_store = self._setup_collection()
indexer-1  |   File "/usr/src/app/indexer.py", line 88, in _setup_collection
indexer-1  |     return QdrantVectorStore(
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 213, in __init__
indexer-1  |     self._validate_collection_config(
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 1050, in _validate_collection_config
indexer-1  |     cls._validate_collection_for_dense(
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 1116, in _validate_collection_for_dense
indexer-1  |     raise QdrantVectorStoreError(
indexer-1  | langchain_qdrant.qdrant.QdrantVectorStoreError: Existing Qdrant collection is configured for dense vectors with 8192 dimensions. Selected embeddings are 1024-dimensional. If you want to recreate the collection, set `force_recreate` parameter to `True`.

Or easier to see with just the indexer-1 info:

Attaching to chat-1, indexer-1, llm-1, ollama, qdrant
indexer-1  | INFO:     Will watch for changes in these directories: ['/usr/src/app']
indexer-1  | INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
indexer-1  | INFO:     Started reloader process [7] using WatchFiles
##
# >> indexer-1  | The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.
##
0it [00:00, ?it/s]
indexer-1  | INFO:sentence_transformers.SentenceTransformer:Load pretrained SentenceTransformer: BAAI/bge-m3
indexer-1  | INFO:httpx:HTTP Request: GET http://qdrant:6333/collections/mnm_storage/exists "HTTP/1.1 200 OK"
indexer-1  | INFO:httpx:HTTP Request: GET http://qdrant:6333/collections/mnm_storage "HTTP/1.1 200 OK"
indexer-1  | Process SpawnProcess-1:
indexer-1  | Traceback (most recent call last):
indexer-1  |   File "/usr/local/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
indexer-1  |     self.run()
indexer-1  |   File "/usr/local/lib/python3.9/multiprocessing/process.py", line 108, in run
indexer-1  |     self._target(*self._args, **self._kwargs)
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
indexer-1  |     target(sockets=sockets)
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 66, in run
indexer-1  |     return asyncio.run(self.serve(sockets=sockets))
indexer-1  |   File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
indexer-1  |     return loop.run_until_complete(main)
indexer-1  |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
indexer-1  |     return future.result()
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 70, in serve
indexer-1  |     await self._serve(sockets)
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 77, in _serve
indexer-1  |     config.load()
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/config.py", line 435, in load
indexer-1  |     self.loaded_app = import_from_string(self.app)
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/importer.py", line 19, in import_from_string
indexer-1  |     module = importlib.import_module(module_str)
indexer-1  |   File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
indexer-1  |     return _bootstrap._gcd_import(name[level:], package, level)
indexer-1  |   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
indexer-1  |   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
indexer-1  |   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
indexer-1  |   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
indexer-1  |   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
indexer-1  |   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
indexer-1  |   File "/usr/src/app/app.py", line 16, in <module>
indexer-1  |     indexer = Indexer()
indexer-1  |   File "/usr/src/app/indexer.py", line 60, in __init__
indexer-1  |     self.document_store = self._setup_collection()
indexer-1  |   File "/usr/src/app/indexer.py", line 88, in _setup_collection
indexer-1  |     return QdrantVectorStore(
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 213, in __init__
indexer-1  |     self._validate_collection_config(
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 1050, in _validate_collection_config
indexer-1  |     cls._validate_collection_for_dense(
indexer-1  |   File "/usr/local/lib/python3.9/site-packages/langchain_qdrant/qdrant.py", line 1116, in _validate_collection_for_dense
indexer-1  |     raise QdrantVectorStoreError(
indexer-1  | langchain_qdrant.qdrant.QdrantVectorStoreError: Existing Qdrant collection is configured for dense vectors with 8192 dimensions. Selected embeddings are 1024-dimensional. If you want to recreate the collection, set `force_recreate` parameter to `True`.

Looking at when the index subtree and files are created, this occurs before any indexing activity appears to be logged and coincides instead roughly with that first marked line. So my assumption is that migrating the Transformers v4.22.0 cache earlier creates the embedding indices using a default length.

Here is my .env file for comparision:

LOCAL_FILES_PATH="/removed/local/path/to/files"
EMBEDDING_MODEL_ID="BAAI/bge-m3"
EMBEDDING_SIZE="8192"
START_INDEXING=true
OLLAMA_MODEL="llama3.2:3b-instruct-q6_K"
RERANKER_MODEL="BAAI/bge-reranker-v2-m3"
USER_ID=removed email
PASSWORD=removed password

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

Successfully merging a pull request may close this issue.

4 participants