You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and this bug is not already filed.
My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
I believe this is a legitimate bug, not just a question. If this is a question, please use the Discussions area.
Describe the bug
I encountered a problem: when using local search, I received an error TypeError: Query column vector must be a vector. Got list<item: double>.
This also caused an error in the DRIFT search mode: RuntimeError: No intermediate answers found in primer response. Ensure that the primer response includes intermediate answers.
Steps to reproduce
Conduct a search on the database built in version 0.3.6 and version 0.4. The search code is as follows: When an aircraft cabin fire occurs, what emergency measures should ATC take?
graphrag query --method drift --query "When an aircraft cabin fire occurs, what emergency measures should ATC take?" --streaming
graphrag query --method drift --local"When an aircraft cabin fire occurs, what emergency measures should ATC take?" --streaming
Expected Behavior
normal operation
GraphRAG Config Used
encoding_model: cl100k_baseskip_workflows: []llm:
type: openai_chat # or azure_openai_chatmodel: gpt-4omodel_supports_json: false # recommended if this is available for your model.# max_tokens: 8192# request_timeout: 180.0# api_base: https://<instance>.openai.azure.com# api_version: 2024-02-15-preview# organization: <organization_id># deployment_name: <azure_model_deployment_name># tokens_per_minute: 150_000 # set a leaky bucket throttle# requests_per_minute: 10_000 # set a leaky bucket throttletemperature: 0.7max_retries: 10max_retry_wait: 10.0# sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times# concurrent_requests: 25 # the number of parallel inflight requests that may be madeparallelization:
stagger: 0.3# num_threads: 50 # the number of threads to use for parallel processingasync_mode: threaded # or asyncioembeddings:
async_mode: threaded # or asynciollm:
type: openai_embedding # or azure_openai_embeddingmodel: text-embedding-3-large# api_version: 2024-02-15-preview# organization: <organization_id># deployment_name: <azure_model_deployment_name># tokens_per_minute: 150_000 # set a leaky bucket throttle# requests_per_minute: 10_000 # set a leaky bucket throttlemax_retries: 10max_retry_wait: 10.0# sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times# concurrent_requests: 25 # the number of parallel inflight requests that may be made# batch_size: 16 # the number of documents to send in a single request# batch_max_tokens: 8191 # the maximum number of tokens to send in a single request# target: required # or optionalchunks:
size: 2000overlap: 200group_by_columns: [id] # by default, we don't allow chunks to cross documentsinput:
type: file # or blobfile_type: text # or csvbase_dir: "input"file_encoding: utf-8file_pattern: ".*\\.txt$"cache:
type: file # or blobbase_dir: "cache"# connection_string: <azure_blob_storage_connection_string># container_name: <azure_blob_storage_container_name>storage:
type: file # or blobbase_dir: "output"# connection_string: <azure_blob_storage_connection_string># container_name: <azure_blob_storage_container_name>reporting:
type: file # or console, blobbase_dir: "output"# connection_string: <azure_blob_storage_connection_string># container_name: <azure_blob_storage_container_name>entity_extraction:
## strategy: fully override the entity extraction strategy.## type: one of graph_intelligence, graph_intelligence_json and nltk## llm: override the global llm settings for this task## parallelization: override the global parallelization settings for this task## async_mode: override the global async_mode settings for this taskprompt: "prompts/entity_extraction.txt"entity_types: [ORGANIZATION, PERSON, GOAL, EVENT, ACTIVITY, EQUIPMENT, FACILITIES, DEPARTMENT, ROLE, POSITION, OPERATION, TASK, PARAMETER, INDICATOR, DOCUMENT, SYSTEM, AIRCRAFT, VEHICLE, EVENT, COMPANY]max_gleanings: 10summarize_descriptions:
## llm: override the global llm settings for this task## parallelization: override the global parallelization settings for this task## async_mode: override the global async_mode settings for this taskprompt: "prompts/summarize_descriptions.txt"max_length: 2000claim_extraction:
## llm: override the global llm settings for this task## parallelization: override the global parallelization settings for this task## async_mode: override the global async_mode settings for this task# enabled: trueprompt: "prompts/claim_extraction.txt"description: "Any claims or facts that could be relevant to information discovery."max_gleanings: 10community_reports:
## llm: override the global llm settings for this task## parallelization: override the global parallelization settings for this task## async_mode: override the global async_mode settings for this taskprompt: "prompts/community_report.txt"max_length: 3000max_input_length: 10000cluster_graph:
max_cluster_size: 10embed_graph:
enabled: true # if true, will generate node2vec embeddings for nodesnum_walks: 10walk_length: 40window_size: 2iterations: 3random_seed: 597832umap:
enabled: true # if true, will generate UMAP embeddings for nodessnapshots:
graphml: trueraw_entities: truetop_level_nodes: truelocal_search:
text_unit_prop: 0.5community_prop: 0.1conversation_history_max_turns: 5top_k_mapped_entities: 10top_k_relationships: 10max_tokens: 12000global_search:
max_tokens: 12000data_max_tokens: 12000map_max_tokens: 1000reduce_max_tokens: 2000concurrency: 32
Logs and screenshots
creating llm client with {'api_key': 'REDACTED,len=51', 'type': "openai_chat", 'model': 'gpt-4o', 'max_tokens': 4000, 'temperature': 0.7, 'top_p': 1.0, 'n': 1, 'request_timeout': 180.0, 'api_base': 'https://api.gogoai.cloud', 'api_version': None, 'organization': None, 'proxy': None, 'audience': None, 'deployment_name': None, 'model_supports_json': False, 'tokens_per_minute': 0, 'requests_per_minute': 0, 'max_retries': 10, 'max_retry_wait': 10.0, 'sleep_on_rate_limit_recommendation': True, 'concurrent_requests': 25}
creating embedding llm client with {'api_key': 'REDACTED,len=49', 'type': "openai_embedding", 'model': 'embedding-2', 'max_tokens': 4000, 'temperature': 0, 'top_p': 1, 'n': 1, 'request_timeout': 180.0, 'api_base': 'https://open.bigmodel.cn/api/paas/v4', 'api_version': None, 'organization': None, 'proxy': None, 'audience': None, 'deployment_name': None, 'model_supports_json': None, 'tokens_per_minute': 0, 'requests_per_minute': 0, 'max_retries': 10, 'max_retry_wait': 10.0, 'sleep_on_rate_limit_recommendation': True, 'concurrent_requests': 25}
Failed to generate expansion for query: When an aircraft cabin fire occurs, what emergency measures should ATC take?
D:\element_path\miniconda\envs\graph\Lib\site-packages\numpy\core\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.
return bound(*args, **kwds)
0%| | 0/5 [00:00<?, ?it/s]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
20%|████████████████████▍ | 1/5 [00:01<00:05, 1.39s/it]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
40%|████████████████████████████████████████▊ | 2/5 [00:01<00:01, 1.57it/s]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
60%|█████████████████████████████████████████████████████████████▏ | 3/5 [00:01<00:01, 1.97it/s]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
80%|█████████████████████████████████████████████████████████████████████████████████▌ | 4/5 [00:02<00:00, 2.26it/s]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:02<00:00, 1.69it/s]
╭────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────╮
Additional Information
GraphRAG Version:0.4
Operating System:windows
Python Version:3.11
Related Issues:
The text was updated successfully, but these errors were encountered:
shaoqing404
added
bug
Something isn't working
triage
Default label assignment, indicates new issue needs reviewed by a maintainer
labels
Nov 6, 2024
shaoqing404
changed the title
[Bug]: <title>
[Bug]: Unable to use dirft mode and local mode, the error was traced to llm/openai/utils/try_parse_json_object, and json could not be loaded.
Nov 6, 2024
Do you need to file an issue?
Describe the bug
I encountered a problem: when using local search, I received an error TypeError: Query column vector must be a vector. Got list<item: double>.
This also caused an error in the DRIFT search mode: RuntimeError: No intermediate answers found in primer response. Ensure that the primer response includes intermediate answers.
Steps to reproduce
Conduct a search on the database built in version 0.3.6 and version 0.4. The search code is as follows: When an aircraft cabin fire occurs, what emergency measures should ATC take?
graphrag query --method drift --query "When an aircraft cabin fire occurs, what emergency measures should ATC take?" --streaming
graphrag query --method drift --local"When an aircraft cabin fire occurs, what emergency measures should ATC take?" --streaming
Expected Behavior
normal operation
GraphRAG Config Used
Logs and screenshots
creating llm client with {'api_key': 'REDACTED,len=51', 'type': "openai_chat", 'model': 'gpt-4o', 'max_tokens': 4000, 'temperature': 0.7, 'top_p': 1.0, 'n': 1, 'request_timeout': 180.0, 'api_base': 'https://api.gogoai.cloud', 'api_version': None, 'organization': None, 'proxy': None, 'audience': None, 'deployment_name': None, 'model_supports_json': False, 'tokens_per_minute': 0, 'requests_per_minute': 0, 'max_retries': 10, 'max_retry_wait': 10.0, 'sleep_on_rate_limit_recommendation': True, 'concurrent_requests': 25}
creating embedding llm client with {'api_key': 'REDACTED,len=49', 'type': "openai_embedding", 'model': 'embedding-2', 'max_tokens': 4000, 'temperature': 0, 'top_p': 1, 'n': 1, 'request_timeout': 180.0, 'api_base': 'https://open.bigmodel.cn/api/paas/v4', 'api_version': None, 'organization': None, 'proxy': None, 'audience': None, 'deployment_name': None, 'model_supports_json': None, 'tokens_per_minute': 0, 'requests_per_minute': 0, 'max_retries': 10, 'max_retry_wait': 10.0, 'sleep_on_rate_limit_recommendation': True, 'concurrent_requests': 25}
Failed to generate expansion for query: When an aircraft cabin fire occurs, what emergency measures should ATC take?
D:\element_path\miniconda\envs\graph\Lib\site-packages\numpy\core\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.
return bound(*args, **kwds)
0%| | 0/5 [00:00<?, ?it/s]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
20%|████████████████████▍ | 1/5 [00:01<00:05, 1.39s/it]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
40%|████████████████████████████████████████▊ | 2/5 [00:01<00:01, 1.57it/s]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
60%|█████████████████████████████████████████████████████████████▏ | 3/5 [00:01<00:01, 1.97it/s]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
80%|█████████████████████████████████████████████████████████████████████████████████▌ | 4/5 [00:02<00:00, 2.26it/s]not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "D:\element_path\miniconda\envs\graph\Lib\site-packages\graphrag\llm\openai\utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\element_path\miniconda\envs\graph\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:02<00:00, 1.69it/s]
╭────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────╮
Additional Information
The text was updated successfully, but these errors were encountered: