-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix: Ensure entity_or_relation_name is a string in _handle_entity_relation_summary #415
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fix(lightrag_siliconcloud_demo.py): max_token_size
[FIX] fix infinite loading hf model bug that cause oom
[hotfix-HKUDS#75][embedding] Fix the potential embedding problem
typo(lightrag/lightrag.py): typo
Error Handling: Handled potential FileNotFoundError for README.md and requirements.txt. Checked for missing required metadata and raised an informative error if any are missing. Automated Package Discovery: Replaced packages=["lightrag"] with setuptools.find_packages() to automatically find sub-packages and exclude test or documentation directories. Additional Metadata: Added Development Status in classifiers to indicate a "Beta" release (modify based on the project's maturity). Used project_urls to link documentation, source code, and an issue tracker, which are standard for open-source projects. Compatibility: Included include_package_data=True to include additional files specified in MANIFEST.in. These changes enhance the readability, reliability, and openness of the code, making it more contributor-friendly and ensuring it’s ready for open-source distribution.
Key Enhancements:
Added Github Actions
[FIX] fix hf output bug (current output contain user prompt which cause logical error in entity extraction phase)
fixing knowledge_graph keyword bug
Add MongoDB as KV storage
- 在 LightRAG 类中添加 embedding_cache_config配置项 - 实现基于 embedding 相似度的缓存查询和存储 - 添加量化和反量化函数,用于压缩 embedding 数据 - 新增示例演示 embedding 缓存的使用
- 在 LightRAG 类中添加 embedding_cache_config配置项 - 实现基于 embedding 相似度的缓存查询和存储 - 添加量化和反量化函数,用于压缩 embedding 数据 - 新增示例演示 embedding 缓存的使用
添加查询时使用embedding缓存功能
修复 args_hash在使用常规缓存时候才计算导致embedding缓存时没有计算的bug
Fixed typing error in python3.9
Update oracle_impl.py
Add support for Ollama streaming output and integrate Open-WebUI as the chat UI demo
- 在 json.dumps 中添加 ensure_ascii=False 参数,以支持非 ASCII 字符编码 -这个修改确保了包含中文等非 ASCII 字符的日志信息能够正确处理和显示
# Conflicts: # lightrag/llm.py # lightrag/operate.py
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I encountered an issue where the function
_handle_entity_relation_summary
raised the following error:This error occurred because the function was being called with a tuple
(src_id, tgt_id)
instead of a string. To resolve this issue, I made the following changes:Converted the Tuple to a Formatted String
Replaced the call to
_handle_entity_relation_summary
with:This ensures that the
entity_or_relation_name
argument is always passed as a string.Maintained Consistency
Updated the code to use formatted strings for better readability and alignment with the function's expectations.
Steps to Reproduce the Issue
_merge_edges_then_upsert
function with a graph edge where the tuple(src_id, tgt_id)
is passed to_handle_entity_relation_summary
.Solution
Ensure
entity_or_relation_name
is a string by using a formatted stringf"({src_id}, {tgt_id})"
instead of the tuple.