mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 16:56:27 +02:00
knn cleanups and tests
This commit is contained in:
parent
b1e7a93a11
commit
f217cbf2bd
8 changed files with 1328 additions and 398 deletions
16
tests/correctness/build.py
Normal file
16
tests/correctness/build.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import numpy as np
|
||||
import duckdb
|
||||
db = duckdb.connect(":memory:")
|
||||
|
||||
result = db.execute(
|
||||
"""
|
||||
select
|
||||
-- _id,
|
||||
-- title,
|
||||
-- text as contents,
|
||||
embedding::float[] as embeddings
|
||||
from "hf://datasets/Supabase/dbpedia-openai-3-large-1M/dbpedia_openai_3_large_00.parquet"
|
||||
"""
|
||||
).fetchnumpy()['embeddings']
|
||||
|
||||
np.save("dbpedia_openai_3_large_00.npy", np.vstack(result))
|
||||
Loading…
Add table
Add a link
Reference in a new issue