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

fix: new interface of pgvecto.rs after v0.2 #301

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

cutecutecat
Copy link
Contributor

@cutecutecat cutecutecat commented Apr 16, 2024

Close #265

This PR migrated to new interface of pgvecto.rs after v0.2:

  • Operator l2_ops ->vector_l2_ops
  • Operator dot_ops ->vector_dot_ops
  • Operator cosine_ops ->vector_cos_ops
  • Option algorithm ->indexing
  • Option indexing.ivf.nprob ->indexing.ivf.nsample
  • Add vectors to search_path for schema requirement

And connect to the new index type:

  • IVFSQ8 = indexing.ivf + scaler quantization at pgvecto.rs

Apart from that, we fix a requirement bug for pgvector:

  • sqlalchemy -> psycopg2

How to test it

Please use one of these images to test:

  • Most Recommand: tensorchord/pgvecto-rs:pg16-v0.0.0-nightly.20240410
  • tensorchord/pgvecto-rs:pg16-v0.3.0-alpha.1
  • tensorchord/pgvecto-rs:pg16-v0.2.1

tensorchord/pgvecto-rs:pg16-v0.0.0-nightly.20240410 will be our official v0.3.0 in recent weeks.

How to run image

For image tensorchord/pgvecto-rs:pg16-v0.0.0-nightly.20240410:

docker run  --name pgvecto-rs-demo  \
-e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432   \
-d tensorchord/pgvecto-rs:pg16-v0.0.0-nightly.20240410

Field at Benchmark Webpage

password=mysecretpassword
db_name=postgres

Supported Index types

  • HNSW
  • IVF_FLAT
  • FLAT
  • IVF_SQ8 [recently introduced]

@cutecutecat cutecutecat marked this pull request as ready for review April 16, 2024 03:38
@alwayslove2013 alwayslove2013 self-requested a review April 17, 2024 06:15
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alwayslove2013, cutecutecat
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alwayslove2013 alwayslove2013 merged commit 2966832 into zilliztech:main Apr 17, 2024
4 checks passed
@cutecutecat cutecutecat deleted the fix-pgvecto branch July 16, 2024 01:51
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.

Failing to run the benchmark with pgvecto.rs
3 participants