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

local搜索报错:ZeroDivisionError: Weights sum to zero, can't be normalized #15

Closed
Ikaros-521 opened this issue Jul 26, 2024 · 1 comment

Comments

@Ikaros-521
Copy link
Owner

An error occurred: GraphRAG query failed: Traceback (most recent call last):
File "f:\GraphRAG-Ollama-UI\Miniconda3\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "f:\GraphRAG-Ollama-UI\Miniconda3\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "F:\GraphRAG-Ollama-UI\origin\GraphRAG-Local-UI\graphrag\query_main.py", line 76, in
run_local_search(
File "F:\GraphRAG-Ollama-UI\origin\GraphRAG-Local-UI\graphrag\query\cli.py", line 154, in run_local_search
result = search_engine.search(query=query)
File "F:\GraphRAG-Ollama-UI\origin\GraphRAG-Local-UI\graphrag\query\structured_search\local_search\search.py", line 118, in search
context_text, context_records = self.context_builder.build_context(
File "F:\GraphRAG-Ollama-UI\origin\GraphRAG-Local-UI\graphrag\query\structured_search\local_search\mixed_context.py", line 139, in build_context
selected_entities = map_query_to_entities(
File "F:\GraphRAG-Ollama-UI\origin\GraphRAG-Local-UI\graphrag\query\context_builder\entity_extraction.py", line 55, in map_query_to_entities
search_results = text_embedding_vectorstore.similarity_search_by_text(
File "F:\GraphRAG-Ollama-UI\origin\GraphRAG-Local-UI\graphrag\vector_stores\lancedb.py", line 118, in similarity_search_by_text
query_embedding = text_embedder(text)
File "F:\GraphRAG-Ollama-UI\origin\GraphRAG-Local-UI\graphrag\query\context_builder\entity_extraction.py", line 57, in
text_embedder=lambda t: text_embedder.embed(t),
File "F:\GraphRAG-Ollama-UI\origin\GraphRAG-Local-UI\graphrag\query\llm\oai\embedding.py", line 96, in embed
chunk_embeddings = np.average(chunk_embeddings, axis=0, weights=chunk_lens)
File "f:\GraphRAG-Ollama-UI\Miniconda3\lib\site-packages\numpy\lib\function_base.py", line 550, in average
raise ZeroDivisionError(
ZeroDivisionError: Weights sum to zero, can't be normalized
@Ikaros-521
Copy link
Owner Author

microsoft/graphrag#646

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

No branches or pull requests

1 participant