mirror of
https://github.com/microsoft/graphrag.git
synced 2026-01-14 09:07:20 +08:00
fixes for tests
This commit is contained in:
parent
b2875ab4ab
commit
d698cc2c39
12
.vscode/launch.json
vendored
12
.vscode/launch.json
vendored
@ -50,5 +50,17 @@
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": false
|
||||
},
|
||||
{
|
||||
"name": "Debug Verbs Pytest",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "pytest",
|
||||
"args": [
|
||||
"./tests/verbs",
|
||||
"-k", "test_generate_text_embeddings"
|
||||
],
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": false
|
||||
},
|
||||
]
|
||||
}
|
||||
@ -39,13 +39,16 @@ class LanceDBVectorStore(BaseVectorStore):
|
||||
self, documents: list[VectorStoreDocument], overwrite: bool = True
|
||||
) -> None:
|
||||
"""Load documents into vector storage."""
|
||||
# TODO GAUDY Step 1: Prepare data columns manually
|
||||
# Step 1: Prepare data columns manually
|
||||
ids = []
|
||||
texts = []
|
||||
vectors = []
|
||||
attributes = []
|
||||
|
||||
for document in documents:
|
||||
self.vector_size = (
|
||||
len(document.vector) if document.vector else self.vector_size
|
||||
)
|
||||
if document.vector is not None and len(document.vector) == self.vector_size:
|
||||
ids.append(document.id)
|
||||
texts.append(document.text)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user