[Bug]: SparseTextEmbedding needs to implement aembed for non-blocking use (async/await)
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- api, machine-learning, search
Research direction
Start in fastembed/sparse/sparse_text_embedding.py and compare the sparse class's public API with the async usage shown in the report. Reproduce SparseTextEmbedding('Qdrant/bm25').aembed_query("foo bar") and verify that async/await use no longer raises AttributeError; the expected behavior is an available non-blocking embedding method.
Written by the indexing model from the issue text.
Description
What happened?
I want to be able to use non-blocking embedding, via "aembed" (async/await). This API is missing in this class, but it is part of the expected contract.
What is the expected behaviour?
When an AsyncQdrantClient is used, aembed can be used (async/await) as well. I am talking about https://github.com/langchain-ai/langchain/issues/32195 and testing the patch https://github.com/langchain-ai/langchain/pull/32196/files#r2226270515
I tried a hybrid search and, fair enough, "aembed" works fine with the dense variation but not with the sparse one (fast-sparse-bm25)
A minimal reproducible example
from fastembed.sparse.sparse_text_embedding import SparseTextEmbedding
embedding = SparseTextEmbedding('Qdrant/bm25')
embedding.aembed_query("foo bar")
embedding.aembed_query("foo bar")
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SparseTextEmbedding' object has no attribute 'aembed_query'
What Python version are you on? e.g. python --version
Python 3.11.10
FastEmbed version
fastembed==0.7.1
What os are you seeing the problem on?
MacOS
Relevant stack traces and/or logs
- Dominant language
- Python
- Stars
- 3.3k
- Forks
- 314
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 23
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from qdrant/fastembed
-
[Bug]: Bm25 splits Tamil, Hindi, Sinhala and other words on their combining marksPossibly taken @Nipuna-Lakruwan claimed this 12 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 30/100
qdrant/fastembed#886 · 2 comments ·
Maintainers usually reply within 4 days
-
miniCOIL clean_words mutates input and loses counts when normalized words collidePossibly taken @pear1-pea claimed this 20 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 1/100
Maintainers usually reply within 4 days
-
[Bug]: Revision-pinned HF downloads can falsely report intact files as corruptedPossibly taken @N7766 claimed this 24 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 82/100
Maintainers usually reply within 4 days
-
[Bug]: URL-backed custom models with the same basename reuse the wrong cached modelPossibly taken @rtmalikian claimed this 24 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Maintainers usually reply within 4 days
-
[Bug]: rerank_pairs raises TypeError when pairs are passed as a tuple of pairsPossibly taken @michaelkillgta claimed this 53 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 22/100
Maintainers usually reply within 4 days
All issues in qdrant/fastembed
Similar issues
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
future-agi/future-agi#5274 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
GenericMappingTools/pygmt#5014 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
w3c/feedvalidator#204 ·
-
[BUG][Low–Medium] founder_numbers.py silently reads a SAFE discount or pool target given as a fraction (0.2) as 0.2%Possibly taken @sumitkhond111-del claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bmad-code-org/BMAD-METHOD#3358 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
open-mmlab/mmcv#3352 ·