miniCOIL clean_words mutates input and loses counts when normalized words collide
Maintainers usually reply within 4 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 1/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- machine-learning
Research direction
The issue identifies SparseVectorConverter.clean_words() and provides two offline regression cases, with examples for input mutation and lost counts when normalized words collide. Start by reading that method and inspect the linked pull request #878, which is already open. Done means the cleaned result combines counts while retaining the known word's vocabulary ID and embedding, and the caller's input remains unchanged.
Written by the indexing model from the issue text.
Description
SparseVectorConverter.clean_words() changes the caller's WordEmbedding when an unknown word normalizes to a known word. It also loses the unknown word's count if the known word occurs later in the input mapping.
Reproduced on current main, without downloading a model:
from py_rust_stemmers import SnowballStemmer
from fastembed.sparse.utils.sparse_vectors_converter import SparseVectorConverter, WordEmbedding
converter = SparseVectorConverter(set(), SnowballStemmer("english"))
known = WordEmbedding("cat", ["cat"], 1, 1, [1.0, 0.0])
unknown = WordEmbedding("cat!", ["cat!"], 2, -1, [1.0])
sentence = {"cat": known, "cat!": unknown}
converter.clean_words(sentence)
print(known.count) # 3: caller's original count was 1
print(converter.clean_words(sentence)["cat"].count) # 5 instead of 3
With fresh inputs in the reverse order, the cleaned count is 1 instead of 3. The known word should retain its vocabulary ID and embedding while combining both counts, without changing the input. Two parameterized offline regression cases fail on main (one for input mutation, one for the lost count).
AI assistance: Codex inspected the source and ran the reproductions and tests.
- 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
-
[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
-
[Feature]: Support huggingface-hub 2.0May be free again @joein claimed this 63 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 65/100
qdrant/fastembed#742 · 1 assignee ·
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 ·