-
Notifications
You must be signed in to change notification settings - Fork 559
Description
Search before asking
- I had searched in the issues and found no similar issues.
Operating system information
Windows
What happened
Fail to query the vector with following error, but i really just use 1024 dimension only
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'POST, PUT, GET, DELETE', 'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept, client_id, uuid, Authorization, credentials', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Max-Age': '3600', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'TraceId': '0af000e6175449244483213471', 'Remote': '10.240.0.230', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Date': 'Wed, 06 Aug 2025 15:00:45 GMT', 'Connection': 'close'})
HTTP response body: "Failed to invoke procedure db.index.vector.queryNodes
: Caused by: java.lang.IllegalArgumentException: Index query vector has 1536 dimensions, but indexed vectors have 1024."
2025-08-06 23:00:53 - ERROR - root - run calculate_sim_scores failed, info: (400)
Reason:
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'POST, PUT, GET, DELETE', 'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept, client_id, uuid, Authorization, credentials', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Max-Age': '3600', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'TraceId': '0af000e6175449244928613551', 'Remote': '10.240.0.230', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Date': 'Wed, 06 Aug 2025 15:00:51 GMT', 'Connection': 'close'})
HTTP response body: "Failed to invoke procedure db.index.vector.queryNodes
: Caused by: java.lang.IllegalArgumentException: Index query vector has 1536 dimensions, but indexed vectors have 1024."
Traceback (most recent call last):
File "C:\TestProj\Python\KAGv2\KAG\kag\common\tools\algorithm_tool\chunk_retriever\atomic_query_chunk_retriever.py", line 212, in sync_wrapper
loop = asyncio.get_event_loop()
File "C:\Users\U587212\AppData\Roaming\uv\python\cpython-3.10.16-windows-x86_64-none\lib\asyncio\events.py", line 656, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'asyncio_0'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\TestProj\Python\KAGv2\KAG\kag\common\tools\algorithm_tool\chunk_retriever\atomic_query_chunk_retriever.py", line 226, in invoke
top_k_atomic_queries = self.sync_wrapper(
File "C:\TestProj\Python\KAGv2\KAG\kag\common\tools\algorithm_tool\chunk_retriever\atomic_query_chunk_retriever.py", line 215, in sync_wrapper
return asyncio.run(coro)
File "C:\Users\U587212\AppData\Roaming\uv\python\cpython-3.10.16-windows-x86_64-none\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\U587212\AppData\Roaming\uv\python\cpython-3.10.16-windows-x86_64-none\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\TestProj\Python\KAGv2\KAG\kag\common\tools\algorithm_tool\chunk_retriever\atomic_query_chunk_retriever.py", line 164, in recall_atomic_query
top_k_atomic_queries = await asyncio.gather(*tasks)
File "C:\Users\U587212\AppData\Roaming\uv\python\cpython-3.10.16-windows-x86_64-none\lib\asyncio\threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
File "C:\Users\U587212\AppData\Roaming\uv\python\cpython-3.10.16-windows-x86_64-none\lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\TestProj\Python\KAGv2\KAG\kag\common\tools\algorithm_tool\chunk_retriever\atomic_query_chunk_retriever.py", line 150, in
lambda: self.search_api.search_vector(
File "C:\TestProj\Python\KAGv2\KAG\kag\common\tools\search_api\impl\openspg_search_api.py", line 41, in search_vector
res = self.sc.search_vector(
File "C:\TestProj\Python\KAGv2\KAG\knext\search\client.py", line 50, in search_vector
records = self._rest_client.search_vector_post(vector_search_request=req)
File "C:\TestProj\Python\KAGv2\KAG\knext\search\rest\search_api.py", line 305, in search_vector_post
return self.search_vector_post_with_http_info(**kwargs) # noqa: E501
File "C:\TestProj\Python\KAGv2\KAG\knext\search\rest\search_api.py", line 381, in search_vector_post_with_http_info
return self.api_client.call_api(
File "C:\TestProj\Python\KAGv2\KAG\knext\common\rest\api_client.py", line 419, in call_api
return self.__call_api(
File "C:\TestProj\Python\KAGv2\KAG\knext\common\rest\api_client.py", line 219, in __call_api
raise e
File "C:\TestProj\Python\KAGv2\KAG\knext\common\rest\api_client.py", line 207, in __call_api
response_data = self.request(
File "C:\TestProj\Python\KAGv2\KAG\knext\common\rest\api_client.py", line 495, in request
return self.rest_client.POST(
File "C:\TestProj\Python\KAGv2\KAG\knext\common\rest\rest.py", line 345, in POST
return self.request(
File "C:\TestProj\Python\KAGv2\KAG\knext\common\rest\rest.py", line 257, in request
raise ApiException(http_resp=r)
How to reproduce
vectorize_model: &vectorize_model
api_key: **
base_url: https://dowopenaipoceu.openai.azure.com/
model: text-embedding-ada-002
azure_deployment: text-embedding-ada-002
api_version: 2024-12-01-preview
type: azure_openai
vector_dimensions: 1024
vectorizer: *vectorize_model
Are you willing to submit PR?
- Yes I am willing to submit a PR!