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

ValidationError: document_store.update_embeddings #33

Open
willmsMwx opened this issue Oct 17, 2023 · 0 comments
Open

ValidationError: document_store.update_embeddings #33

willmsMwx opened this issue Oct 17, 2023 · 0 comments

Comments

@willmsMwx
Copy link

Hello,

I wanted to implement the following example with Qdrant: https://haystack.deepset.ai/tutorials/15_tableqa

Initialisation of the DocumentStore:
document_store = QdrantDocumentStore(
":memory:",
index="document",
embedding_dim=768
)

A list with Document(content=current_df, content_type="table", id=key) is created (read_tables()):

tables = read_tables(f"{doc_dir}/tables.json")
document_store.write_documents(tables, index=document_index)

An error is thrown when updating the embeddings in the DocumentStore:
retriever = TableTextRetriever(
document_store=document_store
)
document_store.update_embeddings(retriever=retriever)


File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/qdrant_haystack/document_stores/qdrant.py:372, in QdrantDocumentStore.update_embeddings(self, retriever, index, update_existing_embeddings, filters, batch_size, headers)
362 doc_generator = self.get_all_documents_generator(
363 index=index,
364 filters=filters,
365 batch_size=batch_size,
366 headers=headers,
367 )
369 with tqdm(
370 total=document_count, position=0, unit=" Docs", desc="Updating embeddings"
371 ) as progress_bar:
--> 372 for document_batch in get_batches_from_generator(doc_generator, batch_size):
...
ValidationError: 2 validation errors for Document
content
str type expected (type=type_error.str)
content
instance of DataFrame expected (type=type_error.arbitrary_type; expected_arbitrary_type=DataFrame)

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

No branches or pull requests

1 participant