Skip to content

Commit 588ab3b

Browse files
committed
Fix bug
1 parent 84a293c commit 588ab3b

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/fastembed_sparse_document_embedder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,6 @@ def run(self, documents: list[Document]) -> dict[str, list[Document]]:
177177

178178
new_documents = []
179179
for doc, emb in zip(documents, embeddings):
180-
new_documents.append(replace(doc, embedding=emb))
180+
new_documents.append(replace(doc, sparse_embedding=emb))
181181

182182
return {"documents": new_documents}

integrations/fastembed/tests/test_fastembed_ranker.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -215,20 +215,6 @@ def test_run_incorrect_input_format(self):
215215
):
216216
ranker.run(query=query, documents=list_document, top_k=-3)
217217

218-
def test_run_no_warmup(self):
219-
"""
220-
Test for checking error when calling without a warmup.
221-
"""
222-
ranker = FastembedRanker(model_name="Xenova/ms-marco-MiniLM-L-12-v2")
223-
224-
query = "query"
225-
list_document = [Document("Document 1")]
226-
227-
with pytest.raises(
228-
RuntimeError,
229-
):
230-
ranker.run(query=query, documents=list_document)
231-
232218
def test_run_empty_document_list(self):
233219
"""
234220
Test for no error when sending no documents.

0 commit comments

Comments
 (0)