fastembed-haystack 2.4.0__tar.gz → 2.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/CHANGELOG.md +15 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/PKG-INFO +1 -1
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/embedders/fastembed/fastembed_sparse_document_embedder.py +1 -1
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/rankers/fastembed/late_interaction_ranker.py +2 -2
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/rankers/fastembed/ranker.py +2 -2
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/test_fastembed_late_interaction_ranker.py +19 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/test_fastembed_ranker.py +6 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/.gitignore +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/LICENSE.txt +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/README.md +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/examples/example.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/examples/ranker_example.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/examples/sparse_example.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/pydoc/config_docusaurus.yml +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/pyproject.toml +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/embedders/fastembed/__init__.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/embedders/fastembed/embedding_backend/__init__.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/embedders/fastembed/embedding_backend/fastembed_backend.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/embedders/fastembed/fastembed_document_embedder.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/embedders/fastembed/fastembed_sparse_text_embedder.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/embedders/fastembed/fastembed_text_embedder.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/embedders/py.typed +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/rankers/fastembed/__init__.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/src/haystack_integrations/components/rankers/py.typed +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/__init__.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/test_fastembed_backend.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/test_fastembed_document_embedder.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/test_fastembed_sparse_document_embedder.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/test_fastembed_sparse_text_embedder.py +0 -0
- {fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/test_fastembed_text_embedder.py +0 -0
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [integrations/fastembed-v2.4.0] - 2026-07-30
|
|
4
|
+
|
|
5
|
+
### 🚀 Features
|
|
6
|
+
|
|
7
|
+
- *(fastembed)* Allow passing model_kwargs to dense embedders (#3558)
|
|
8
|
+
|
|
9
|
+
### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- Fix new issues raised by ruff 0.16.0 (#3670)
|
|
12
|
+
|
|
13
|
+
### 📚 Documentation
|
|
14
|
+
|
|
15
|
+
- Fix wrong class references in Fastembed sparse embedder messages and docstrings (#3610)
|
|
16
|
+
|
|
17
|
+
|
|
3
18
|
## [integrations/fastembed-v2.3.0] - 2026-04-30
|
|
4
19
|
|
|
5
20
|
### 🚀 Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastembed-haystack
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
4
4
|
Summary: Haystack 2.x component to embed strings and Documents using fastembed embedding model
|
|
5
5
|
Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations
|
|
6
6
|
Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/fastembed/README.md
|
|
@@ -53,7 +53,7 @@ class FastembedSparseDocumentEmbedder:
|
|
|
53
53
|
result = sparse_doc_embedder.run(document_list)
|
|
54
54
|
print(f"Document Text: {result['documents'][0].content}")
|
|
55
55
|
print(f"Document Sparse Embedding: {result['documents'][0].sparse_embedding}")
|
|
56
|
-
print(f"
|
|
56
|
+
print(f"Number of non-zero elements: {len(result['documents'][0].sparse_embedding.indices)}")
|
|
57
57
|
```
|
|
58
58
|
"""
|
|
59
59
|
|
|
@@ -189,10 +189,10 @@ class FastembedLateInteractionRanker:
|
|
|
189
189
|
if not documents:
|
|
190
190
|
return {"documents": []}
|
|
191
191
|
|
|
192
|
-
top_k
|
|
193
|
-
if top_k <= 0:
|
|
192
|
+
if top_k is not None and top_k <= 0:
|
|
194
193
|
msg = f"top_k must be > 0, but got {top_k}"
|
|
195
194
|
raise ValueError(msg)
|
|
195
|
+
top_k = self.top_k if top_k is None else top_k
|
|
196
196
|
|
|
197
197
|
if self._model is None:
|
|
198
198
|
self.warm_up()
|
|
@@ -179,10 +179,10 @@ class FastembedRanker:
|
|
|
179
179
|
if not documents:
|
|
180
180
|
return {"documents": []}
|
|
181
181
|
|
|
182
|
-
top_k
|
|
183
|
-
if top_k <= 0:
|
|
182
|
+
if top_k is not None and top_k <= 0:
|
|
184
183
|
msg = f"top_k must be > 0, but got {top_k}"
|
|
185
184
|
raise ValueError(msg)
|
|
185
|
+
top_k = self.top_k if top_k is None else top_k
|
|
186
186
|
|
|
187
187
|
if self._model is None:
|
|
188
188
|
self.warm_up()
|
|
@@ -222,6 +222,25 @@ class TestFastembedLateInteractionRanker:
|
|
|
222
222
|
):
|
|
223
223
|
ranker.run(query=query, documents=list_document, top_k=-3)
|
|
224
224
|
|
|
225
|
+
with pytest.raises(
|
|
226
|
+
ValueError,
|
|
227
|
+
match="top_k must be > 0, but got 0",
|
|
228
|
+
):
|
|
229
|
+
ranker.run(query=query, documents=list_document, top_k=0)
|
|
230
|
+
|
|
231
|
+
def test_run_runtime_top_k_zero_does_not_fall_back_to_instance_top_k(self):
|
|
232
|
+
"""
|
|
233
|
+
A runtime top_k=0 must raise, not silently fall back to the instance top_k.
|
|
234
|
+
"""
|
|
235
|
+
ranker = FastembedLateInteractionRanker(model_name="colbert-ir/colbertv2.0", top_k=5)
|
|
236
|
+
ranker._model = "mock_model"
|
|
237
|
+
|
|
238
|
+
with pytest.raises(
|
|
239
|
+
ValueError,
|
|
240
|
+
match="top_k must be > 0, but got 0",
|
|
241
|
+
):
|
|
242
|
+
ranker.run(query="query", documents=[Document("Document 1")], top_k=0)
|
|
243
|
+
|
|
225
244
|
def test_run_empty_document_list(self):
|
|
226
245
|
"""
|
|
227
246
|
Test for no error when sending no documents.
|
|
@@ -226,6 +226,12 @@ class TestFastembedRanker:
|
|
|
226
226
|
):
|
|
227
227
|
ranker.run(query=query, documents=list_document, top_k=-3)
|
|
228
228
|
|
|
229
|
+
with pytest.raises(
|
|
230
|
+
ValueError,
|
|
231
|
+
match="top_k must be > 0, but got 0",
|
|
232
|
+
):
|
|
233
|
+
ranker.run(query=query, documents=list_document, top_k=0)
|
|
234
|
+
|
|
229
235
|
def test_run_empty_document_list(self):
|
|
230
236
|
"""
|
|
231
237
|
Test for no error when sending no documents.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/test_fastembed_document_embedder.py
RENAMED
|
File without changes
|
|
File without changes
|
{fastembed_haystack-2.4.0 → fastembed_haystack-2.5.0}/tests/test_fastembed_sparse_text_embedder.py
RENAMED
|
File without changes
|
|
File without changes
|