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

feat: add RedisKVStorage, MilvusVectorStorage, and NebulaGraphStorage #71

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

utopia2077
Copy link

@utopia2077 utopia2077 commented Oct 6, 2024

  • Implement RedisKVStorage for key-value storage.
  • Implement MilvusVectorStorage for vector storage.
  • Implement NebulaGraphStorage for graph storage. Refer to feat: NebulaGraph as persistant layer #9
  • Add tests for NebulaGraphStorage to ensure functionality.

TODO

  • Test for RedisKVStorage,MilvusVectorStorage
  • docs

@utopia2077 utopia2077 changed the base branch from main to dev October 6, 2024 20:10
@gusye1234
Copy link
Owner

Hi, MilvusStorage is already implemented, referring to this. We remove it from the package because the milvus-lite doesn't support window platform and we hope anyone can have a try of the default nano-graphrag.

Also great work!

@gusye1234
Copy link
Owner

Hi @utopia2077 , I think you should change your base branch to main.

@utopia2077 utopia2077 changed the base branch from dev to main October 10, 2024 18:21
@gusye1234
Copy link
Owner

Hi, great PR. Can you consider remove the milvus vectorDB from the bulit-in? Because it doesn't support windows platform and will cause the windows users unable to install nano-graphrag.
I think MilvusStorage is better on examples.

Besides that, the rest is really perfect!

@gusye1234
Copy link
Owner

gusye1234 commented Oct 16, 2024

@wey-gu Would you might to review the part of NebulaGraph Storage in this PR? It will be a huge favor!

@@ -3,3 +3,6 @@
from .vdb_hnswlib import HNSWVectorStorage
from .vdb_nanovectordb import NanoVectorDBStorage
from .kv_json import JsonKVStorage
from .kv_redis import RedisKVStorage
from .vdb_milvus import MilvusVectorStorage
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe remove this line, so the Milvus is not imported by default?

neo4j
pymilvus
Copy link
Owner

Choose a reason for hiding this comment

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

Remove the milvus dep, so those who want to use this component will handle the cross platform. Let's not introduce the install problems for the rest.

@wey-gu
Copy link

wey-gu commented Oct 17, 2024

@wey-gu Would you might to review the part of NebulaGraph Storage in this PR? It will be a huge favor!

@gusye1234 Sure Will do!
@utopia2077 amazing work!🫡🙇


class MyNebulaReader(NebulaReader):
"""
If the property has the name 'order', it will cause an error.
Copy link

Choose a reason for hiding this comment

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

if we escape prop name with `, error still encountered?

levels = defaultdict(set)


communities_result = self.client.execute_py(
Copy link

Choose a reason for hiding this comment

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

this involves fullscan, we could create a index for COMMUNITY_VERTEX_TYPE tag to make this call more scalable :)

Ref: https://docs.nebula-graph.io/3.8.0/3.ngql-guide/14.native-index-statements/1.create-native-index/

If we are going do it in a programming way, a pitfall is that the index need to wait for two heartbeats of NebulaGraph cluster(default 20s) maximally to ensure it's synced across all metaDs

We could keep it as is or ask user to create them manually.

Note if we create index after the data was already there, we need to rebuild the index(see from the docs as well)

Choose a reason for hiding this comment

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

I want to know why community_report_storage_cls still use JsonKVStorage ? Is there any problem

Copy link

Choose a reason for hiding this comment

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

It shouldn't actually our preparatory impl are full-graph-wise. Just to kept the original design of ms and nano graph-rag here.

Copy link

@wey-gu wey-gu left a comment

Choose a reason for hiding this comment

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

Great work!!! Looks Great to me

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

Successfully merging this pull request may close these issues.

4 participants