feat(logosdb): add LogosDB vector database integration#782
Open
jose-compu wants to merge 1 commit into
Open
Conversation
- Add LogosDB embedded HNSW client (local file-based, mmap, hnswlib) - Config: LogosDBConfig (uri path) + LogosDBIndexConfig (metric type) - Supports COSINE, L2, and IP distance metrics - Uses put_batch for efficient bulk insert; metadata IDs stored as text - Register DB.LogosDB enum, init_cls, config_cls, case_config_cls - Register 'logosdb' CLI command in vectordbbench - Add logosdb optional extra in pyproject.toml Benchmark result (50K OpenAI 1536-dim, COSINE): recall@100=0.9347 ndcg=0.9464 p99=4.6ms p95=4.0ms
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jose-compu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Author
|
can you please review @sre-ci-robot @jkatz @javiervegas @claude ? |
This file contains hidden or 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
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.
Summary
VectorDBinterface:__init__,initcontext manager,insert_embeddings(viaput_batch),search_embedding, andoptimize.DB.LogosDBin the enum and wires upinit_cls,config_cls, andcase_config_cls.logosdbCLI subcommand with a--uriflag (local directory path).logosdbas an optional extra inpyproject.toml.Design notes
--uri.MetricTypeat runtime (COSINE/L2/IP). COSINE is the default and auto-normalizes vectors.str(id)) and parsed back on search, since LogosDB's internal row IDs are independent of the benchmark ID space.optimize()is a no-op with a log message.Benchmark result
Tested on
Performance1536D50K(OpenAI embeddings, 50K vectors, 1536 dim, COSINE) on Apple M-series:Test plan
pip install logosdb(binary wheels for Linux x86_64/aarch64 and macOS x86_64/arm64, CPython 3.9-3.13)vectordbbench logosdb --uri /tmp/vdbbench_logosdb --case-type Performance1536D50K --skip-search-concurrentvectordb_bench/results/LogosDB/