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

Update OceanBaseStore to be compatible with oceanbase-4.3.3.0 #2074

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

GITHUBear
Copy link
Contributor

Description

OceanBase officially released the vector store function in version 4.3.3. The SQL statements to use vector index have been changed. For compatibility, the implementation of OceanBaseStore should be updated:

  • Using pyobvector as middleware
  • Support filters when perform ANN search

How Has This Been Tested?

  • Test the knowledge base function using OceanBase + DB-GPT.
  • make fmt
  • make mypy
  • make test

Snapshots:

Checklist:

  • My code follows the style guidelines of this project
  • I have already rebased the commits and make the commit message conform to the project standard.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

Signed-off-by: shanhaikang.shk <shanhaikang.shk@oceanbase.com>
Signed-off-by: shanhaikang.shk <shanhaikang.shk@oceanbase.com>
Signed-off-by: shanhaikang.shk <shanhaikang.shk@oceanbase.com>
Signed-off-by: shanhaikang.shk <shanhaikang.shk@oceanbase.com>
@csunny
Copy link
Collaborator

csunny commented Oct 18, 2024

Hi @GITHUBear, Can the default value of ob_vector_memory_limit_percentage be set to 30?

[SQL: CREATE VECTOR INDEX vidx ON obvector_test_v2 (embedding) WITH (distance=l2,m=16,ef_construction=256,lib=vsag,type=hnsw)]

@csunny
Copy link
Collaborator

csunny commented Oct 18, 2024

Cool, works and easy to use than previous versions.
image

@GITHUBear
Copy link
Contributor Author

GITHUBear commented Oct 18, 2024

Can the default value of ob_vector_memory_limit_percentage be set to 30?

@csunny Yes, we recommend setting the value of ob_vector_memory_limit_percentage to 30. This can be done via pyobvector:

from pyobvector import ObVecClient

tmp_client = ObVecClient()
tmp_client.perform_raw_text_sql(
    "ALTER SYSTEM ob_vector_memory_limit_percentage = 30"
)

Since a tenant only needs to set ob_vector_memory_limit_percentage once, we do not involve it into pyobvector.

@csunny
Copy link
Collaborator

csunny commented Oct 18, 2024

What I mean is that OB sets the default value of ob_vector_memory_limit_percentage in the kernel parameters to 30. 😊
@GITHUBear

Copy link
Collaborator

@csunny csunny left a comment

Choose a reason for hiding this comment

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

LGTM, 🎉🎉

Copy link
Collaborator

@Aries-ckt Aries-ckt left a comment

Choose a reason for hiding this comment

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

LGTM

@Aries-ckt Aries-ckt merged commit c398fb6 into eosphoros-ai:main Oct 18, 2024
2 checks passed
@Aries-ckt Aries-ckt added the hacktoberfest-accepted hacktoberfest-accepted label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants