graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

[Issue]: <title> ❌ Errors occurred during the pipeline run, see logs for more details. but different

Open zw-change opened this issue 1 year ago • 0 comments

Describe the issue

❌ create_base_entity_graph None

Steps to reproduce

run the getstart

GraphRAG Config Used

encoding_model: cl100k_base skip_workflows: [] llm: api_key: ${GRAPHRAG_API_KEY} type: openai_chat # or azure_openai_chat model: gpt-3.5-turbo-1106 #修改 model_supports_json: false # recommended if this is available for your model. api_base: https://api.agicto.cn/v1 #修改

max_tokens: 4000

request_timeout: 180.0

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 throttle

max_retries: 10

max_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

parallelization: stagger: 0.3

num_threads: 50 # the number of threads to use for parallel processing

async_mode: threaded # or asyncio

embeddings:

parallelization: override the global parallelization settings for embeddings

async_mode: threaded # or asyncio llm: api_key: ${GRAPHRAG_API_KEY} type: openai_embedding # or azure_openai_embedding model: text-embedding-3-small #修改 api_base: https://api.agicto.cn/v1 #修改 # api_base: https://.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 throttle # max_retries: 10 # max_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 optional

chunks: size: 300 overlap: 100 group_by_columns: [id] # by default, we don't allow chunks to cross documents

input: type: file # or blob file_type: text # or csv base_dir: "input" file_encoding: utf-8 file_pattern: ".*\.txt$"

cache: type: file # or blob base_dir: "cache"

connection_string: <azure_blob_storage_connection_string>

container_name: <azure_blob_storage_container_name>

storage: type: file # or blob base_dir: "output/${timestamp}/artifacts"

connection_string: <azure_blob_storage_connection_string>

container_name: <azure_blob_storage_container_name>

reporting: type: file # or console, blob base_dir: "output/${timestamp}/reports"

connection_string: <azure_blob_storage_connection_string>

container_name: <azure_blob_storage_container_name>

entity_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

prompt: "prompts/entity_extraction.txt" entity_types: [organization,person,geo,event] max_gleanings: 0

summarize_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 task

prompt: "prompts/summarize_descriptions.txt" max_length: 500

claim_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: true

prompt: "prompts/claim_extraction.txt" description: "Any claims or facts that could be relevant to information discovery." max_gleanings: 0

community_report:

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

prompt: "prompts/community_report.txt" max_length: 2000 max_input_length: 8000

cluster_graph: max_cluster_size: 10

embed_graph: enabled: false # if true, will generate node2vec embeddings for nodes

num_walks: 10

walk_length: 40

window_size: 2

iterations: 3

random_seed: 597832

umap: enabled: false # if true, will generate UMAP embeddings for nodes

snapshots: graphml: false raw_entities: false top_level_nodes: false

local_search:

text_unit_prop: 0.5

community_prop: 0.1

conversation_history_max_turns: 5

top_k_mapped_entities: 10

top_k_relationships: 10

max_tokens: 12000

global_search:

max_tokens: 12000

data_max_tokens: 12000

map_max_tokens: 1000

reduce_max_tokens: 2000

concurrency: 32

Logs and screenshots

{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n File "C:\Python311\Lib\site-packages\graphrag\llm\base\base_llm.py", line 53, in _invoke\n output = await self._execute_llm(input, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\openai\openai_chat_llm.py", line 58, in execute_llm\n return completion.choices[0].message.content\n ~~~~~~~~~~~~~~~~~~^^^\nTypeError: 'NoneType' object is not subscriptable\n", "source": "'NoneType' object is not subscriptable", "details": {"input": "\n-Goal-\nGiven a text document that is potentially relevant to this activity and a list of entity types, identify all entities of those types from the text and all relationships among the identified entities.\n\n-Steps-\n1. Identify all entities. For each identified entity, extract the following information:\n- entity_name: Name of the entity, capitalized\n- entity_type: One of the following types: [organization,person,geo,event]\n- entity_description: Comprehensive description of the entity's attributes and activities\nFormat each entity as ("entity"<|><entity_name><|><entity_type><|><entity_description>\n\n2. From the entities identified in step 1, identify all pairs of (source_entity, target_entity) that are clearly related to each other.\nFor each pair of related entities, extract the following information:\n- source_entity: name of the source entity, as identified in step 1\n- target_entity: name of the target entity, as identified in step 1\n- relationship_description: explanation as to why you think the source entity and the target entity are related to each other\n- relationship_strength: a numeric score indicating strength of the relationship between the source entity and target entity\n Format each relationship as ("relationship"<|><source_entity><|><target_entity><|><relationship_description><|><relationship_strength>)\n\n3. Return output in English as a single list of all the entities and relationships identified in steps 1 and 2. Use ## as the list delimiter.\n\n4. When finished, output <|COMPLETE|>\n\n######################\n-Examples-\n######################\nExample 1:\n\nEntity_types: [person, technology, mission, organization, location]\nText:\nwhile Alex clenched his jaw, the buzz of frustration dull against the backdrop of Taylor's authoritarian certainty. It was this competitive undercurrent that kept him alert, the sense that his and Jordan's shared commitment to discovery was an unspoken rebellion against Cruz's narrowing vision of control and order.\n\nThen Taylor did something unexpected. They paused beside Jordan and, for a moment, observed the device with something akin to reverence. \u201cIf this tech can be understood..." Taylor said, their voice quieter, "It could change the game for us. For all of us.\u201d\n\nThe underlying dismissal earlier seemed to falter, replaced by a glimpse of reluctant respect for the gravity of what lay in their hands. Jordan looked up, and for a fleeting heartbeat, their eyes locked with Taylor's, a wordless clash of wills softening into an uneasy truce.\n\nIt was a small transformation, barely perceptible, but one that Alex noted with an inward nod. They had all been brought here by different paths\n################\nOutput:\n("entity"<|>"Alex"<|>"person"<|>"Alex is a character who experiences frustration and is observant of the dynamics among other characters.")##\n("entity"<|>"Taylor"<|>"person"<|>"Taylor is portrayed with authoritarian certainty and shows a moment of reverence towards a device, indicating a change in perspective.")##\n("entity"<|>"Jordan"<|>"person"<|>"Jordan shares a commitment to discovery and has a significant interaction with Taylor regarding a device.")##\n("entity"<|>"Cruz"<|>"person"<|>"Cruz is associated with a vision of control and order, influencing the dynamics among other characters.")##\n("entity"<|>"The Device"<|>"technology"<|>"The Device is central to the story, with potential game-changing implications, and is revered by Taylor.")##\n("relationship"<|>"Alex"<|>"Taylor"<|>"Alex is affected by Taylor's authoritarian certainty and observes changes in Taylor's attitude towards the device."<|>7)##\n("relationship"<|>"Alex"<|>"Jordan"<|>"Alex and Jordan share a commitment to discovery, which contrasts with Cruz's vision."<|>6)##\n("relationship"<|>"Taylor"<|>"Jordan"<|>"Taylor and Jordan interact directly regarding the device, leading to a moment of mutual respect and an uneasy truce."<|>8)##\n("relationship"<|>"Jordan"<|>"Cruz"<|>"Jordan's commitment to discovery is in rebellion against Cruz's vision of control and order."<|>5)##\n("relationship"<|>"Taylor"<|>"The Device"<|>"Taylor shows reverence towards the device, indicating its importance and potential impact."<|>9)<|COMPLETE|>\n#############################\nExample 2:\n\nEntity_types: [person, technology, mission, organization, location]\nText:\nThey were no longer mere operatives; they had become guardians of a threshold, keepers of a message from a realm beyond stars and stripes. This elevation in their mission could not be shackled by regulations and established protocols\u2014it demanded a new perspective, a new resolve.\n\nTension threaded through the dialogue of beeps and static as communications with Washington buzzed in the background. The team stood, a portentous air enveloping them. It was clear that the decisions they made in the ensuing hours could redefine humanity's place in the cosmos or condemn them to ignorance and potential peril.\n\nTheir connection to the stars solidified, the group moved to address the crystallizing warning, shifting from passive recipients to active participants. Mercer's latter instincts gained precedence\u2014 the team's mandate had evolved, no longer solely to observe and report but to interact and prepare. A metamorphosis had begun, and Operation: Dulce hummed with the newfound frequency of their daring, a tone set not by the earthly\n#############\nOutput:\n("entity"<|>"Washington"<|>"location"<|>"Washington is a location where communications are being received, indicating its importance in the decision-making process.")##\n("entity"<|>"Operation: Dulce"<|>"mission"<|>"Operation: Dulce is described as a mission that has evolved to interact and prepare, indicating a significant shift in objectives and activities.")##\n("entity"<|>"The team"<|>"organization"<|>"The team is portrayed as a group of individuals who have transitioned from passive observers to active participants in a mission, showing a dynamic change in their role.")##\n("relationship"<|>"The team"<|>"Washington"<|>"The team receives communications from Washington, which influences their decision-making process."<|>7)##\n("relationship"<|>"The team"<|>"Operation: Dulce"<|>"The team is directly involved in Operation: Dulce, executing its evolved objectives and activities."<|>9)<|COMPLETE|>\n#############################\nExample 3:\n\nEntity_types: [person, role, technology, organization, event, location, concept]\nText:\ntheir voice slicing through the buzz of activity. "Control may be an illusion when facing an intelligence that literally writes its own rules," they stated stoically, casting a watchful eye over the flurry of data.\n\n"It's like it's learning to communicate," offered Sam Rivera from a nearby interface, their youthful energy boding a mix of awe and anxiety. "This gives talking to strangers' a whole new meaning."\n\nAlex surveyed his team\u2014each face a study in concentration, determination, and not a small measure of trepidation. "This might well be our first contact," he acknowledged, "And we need to be ready for whatever answers back."\n\nTogether, they stood on the edge of the unknown, forging humanity's response to a message from the heavens. The ensuing silence was palpable\u2014a collective introspection about their role in this grand cosmic play, one that could rewrite human history.\n\nThe encrypted dialogue continued to unfold, its intricate patterns showing an almost uncanny anticipation\n#############\nOutput:\n("entity"<|>"Sam Rivera"<|>"person"<|>"Sam Rivera is a member of a team working on communicating with an unknown intelligence, showing a mix of awe and anxiety.")##\n("entity"<|>"Alex"<|>"person"<|>"Alex is the leader of a team attempting first contact with an unknown intelligence, acknowledging the significance of their task.")##\n("entity"<|>"Control"<|>"concept"<|>"Control refers to the ability to manage or govern, which is challenged by an intelligence that writes its own rules.")##\n("entity"<|>"Intelligence"<|>"concept"<|>"Intelligence here refers to an unknown entity capable of writing its own rules and learning to communicate.")##\n("entity"<|>"First Contact"<|>"event"<|>"First Contact is the potential initial communication between humanity and an unknown intelligence.")##\n("entity"<|>"Humanity's Response"<|>"event"<|>"Humanity's Response is the collective action taken by Alex's team in response to a message from an unknown intelligence.")##\n("relationship"<|>"Sam Rivera"<|>"Intelligence"<|>"Sam Rivera is directly involved in the process of learning to communicate with the unknown intelligence."<|>9)##\n("relationship"<|>"Alex"<|>"First Contact"<|>"Alex leads the team that might be making the First Contact with the unknown intelligence."<|>10)##\n("relationship"<|>"Alex"<|>"Humanity's Response"<|>"Alex and his team are the key figures in Humanity's Response to the unknown intelligence."<|>8)##\n("relationship"<|>"Control"<|>"Intelligence"<|>"The concept of Control is challenged by the Intelligence that writes its own rules."<|>7)<|COMPLETE|>\n#############################\n-Real Data-\n######################\nEntity_types: organization,person,geo,event\nText: y\u0000o\u0000u\u0000 \u0000w\u0000a\u0000n\u0000t\u0000 \u0000w\u0000i\u0000t\u0000h\u0000 \u0000m\u0000e\u0000?\u0000"\u0000\u0000]\u0000\n\u0000\n\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000A\u0000 \u0000C\u0000H\u0000R\u0000I\u0000S\u0000T\u0000M\u0000A\u0000S\u0000 \u0000C\u0000A\u0000R\u0000O\u0000L\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000[\u0000I\u0000l\u0000l\u0000u\u0000s\u0000t\u0000r\u0000a\u0000t\u0000i\u0000o\u0000n\u0000]\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000B\u0000Y\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000C\u0000H\u0000A\u0000R\u0000L\u0000E\u0000S\u0000 \u0000D\u0000I\u0000C\u0000K\u0000E\u0000N\u0000S\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000[\u0000I\u0000l\u0000l\u0000u\u0000s\u0000t\u0000r\u0000a\u0000t\u0000i\u0000o\u0000n\u0000]\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000I\u0000L\u0000L\u0000U\u0000S\u0000T\u0000R\u0000A\u0000T\u0000E\u0000D\u0000 \u0000B\u0000Y\u0000 \u0000A\u0000R\u0000T\u0000H\u0000U\u0000R\u0000 \u0000R\u0000A\u0000C\u0000K\u0000H\u0000A\u0000M\u0000\n\u0000\n######################\nOutput:"}} {"type": "error", "data": "Entity Extraction Error", "stack": "Traceback (most recent call last):\n File "C:\Python311\Lib\site-packages\graphrag\index\graph\extractors\graph\graph_extractor.py", line 118, in call\n result = await self._process_document(text, prompt_variables)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\index\graph\extractors\graph\graph_extractor.py", line 146, in _process_document\n response = await self._llm(\n ^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\openai\json_parsing_llm.py", line 34, in call\n result = await self._delegate(input, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\openai\openai_token_replacing_llm.py", line 37, in call\n return await self._delegate(input, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\openai\openai_history_tracking_llm.py", line 33, in call\n output = await self._delegate(input, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\base\caching_llm.py", line 104, in call\n result = await self._delegate(input, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\base\rate_limiting_llm.py", line 177, in call\n result, start = await execute_with_retry()\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\base\rate_limiting_llm.py", line 159, in execute_with_retry\n async for attempt in retryer:\n File "C:\Python311\Lib\site-packages\tenacity\asyncio\init.py", line 166, in anext\n do = await self.iter(retry_state=self._retry_state)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\tenacity\asyncio\init.py", line 153, in iter\n result = await action(retry_state)\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\tenacity\_utils.py", line 99, in inner\n return call(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\tenacity\init.py", line 398, in \n self._add_action_func(lambda rs: rs.outcome.result())\n ^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\concurrent\futures\_base.py", line 449, in result\n return self.__get_result()\n ^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\concurrent\futures\_base.py", line 401, in __get_result\n raise self._exception\n File "C:\Python311\Lib\site-packages\graphrag\llm\base\rate_limiting_llm.py", line 165, in execute_with_retry\n return await do_attempt(), start\n ^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\base\rate_limiting_llm.py", line 147, in do_attempt\n return await self._delegate(input, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\base\base_llm.py", line 49, in call\n return await self._invoke(input, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\base\base_llm.py", line 53, in _invoke\n output = await self._execute_llm(input, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python311\Lib\site-packages\graphrag\llm\openai\openai_chat_llm.py", line 58, in execute_llm\n return completion.choices[0].message.content\n ~~~~~~~~~~~~~~~~~~^^^\nTypeError: 'NoneType' object is not subscriptable\n", "source": "'NoneType' object is not subscriptable", "details": {"doc_index": 0, "text": "y\u0000o\u0000u\u0000 \u0000w\u0000a\u0000n\u0000t\u0000 \u0000w\u0000i\u0000t\u0000h\u0000 \u0000m\u0000e\u0000?\u0000"\u0000\u0000]\u0000\n\u0000\n\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000A\u0000 \u0000C\u0000H\u0000R\u0000I\u0000S\u0000T\u0000M\u0000A\u0000S\u0000 \u0000C\u0000A\u0000R\u0000O\u0000L\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000[\u0000I\u0000l\u0000l\u0000u\u0000s\u0000t\u0000r\u0000a\u0000t\u0000i\u0000o\u0000n\u0000]\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000B\u0000Y\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000C\u0000H\u0000A\u0000R\u0000L\u0000E\u0000S\u0000 \u0000D\u0000I\u0000C\u0000K\u0000E\u0000N\u0000S\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000[\u0000I\u0000l\u0000l\u0000u\u0000s\u0000t\u0000r\u0000a\u0000t\u0000i\u0000o\u0000n\u0000]\u0000\n\u0000\n\u0000\n\u0000\n\u0000 \u0000 \u0000I\u0000L\u0000L\u0000U\u0000S\u0000T\u0000R\u0000A\u0000T\u0000E\u0000D\u0000 \u0000B\u0000Y\u0000 \u0000A\u0000R\u0000T\u0000H\u0000U\u0000R\u0000 \u0000R\u0000A\u0000C\u0000K\u0000H\u0000A\u0000M\u0000\n\u0000"}}

Additional Information

  • GraphRAG Version:
  • Operating System:
  • Python Version:
  • Related Issues:

zw-change avatar Jul 19 '24 01:07 zw-change