Skip to content

fix(llm): correct e_cache type#117

Merged
imbajin merged 7 commits intoapache:mainfrom
ChenZiHong-Gavin:limit-property-length
Nov 21, 2024
Merged

fix(llm): correct e_cache type#117
imbajin merged 7 commits intoapache:mainfrom
ChenZiHong-Gavin:limit-property-length

Conversation

@ChenZiHong-Gavin
Copy link
Contributor

@ChenZiHong-Gavin ChenZiHong-Gavin commented Nov 19, 2024

  • fix edge cache using (inV, label, outV) as key
  • limit node and edge property length
  • handle isolate node problem

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 19, 2024
@github-actions github-actions bot added the llm label Nov 19, 2024
@dosubot dosubot bot added the bug Something isn't working label Nov 19, 2024
graph_user: Optional[str] = "admin"
graph_pwd: Optional[str] = "xxx"
graph_space: Optional[str] = None
enable_prop_limit: Optional[str] = "False"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer short param name like limit_property

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to limit_property

self,
max_deep: int = 2,
max_items: int = 30,
max_v_prop_length: int = 4096,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max_v_prop_len or v_prop_len_max

same as edge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to max_v_prop_len and max_e_prop_len

raw_flat_rel)[i - 1]["props"][self._prop_to_match]

if item["label"] in e_cache:
if (item['inV'], item['label'], item['outV']) in e_cache:
Copy link
Member

@imbajin imbajin Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid visit params multi times

@imbajin imbajin force-pushed the limit-property-length branch from b563868 to a5eca07 Compare November 20, 2024 11:30
@imbajin imbajin force-pushed the limit-property-length branch from a5eca07 to e4e65be Compare November 20, 2024 11:52
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 21, 2024
@imbajin imbajin changed the title fix: correct e_cache type fix(llm): correct e_cache type Nov 21, 2024
@imbajin imbajin merged commit f8b4582 into apache:main Nov 21, 2024
HJ-Young pushed a commit to HJ-Young/incubator-hugegraph-ai that referenced this pull request Nov 26, 2024
- [X] fix edge cache using (inV, label, outV) as key
- [X] limit node and edge property length
- [X] handle isolate node problem

---------

Co-authored-by: imbajin <jin@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer llm size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants