fix: remove onnxruntime cap as not needed anymore (#517)

* fix: remove onnxruntime cap as not needed anymore

* fix: fix mypy complaints in python3.13
This commit is contained in:
George
2025-05-13 17:54:54 +04:00
committed by GitHub
parent 04bc7a3039
commit 0df605fc92
3 changed files with 3940 additions and 8 deletions

View File

@@ -295,13 +295,13 @@ class MiniCOIL(SparseTextEmbeddingBase, OnnxTextModel[SparseEmbedding]):
)
# Size of counts: (unique_words)
words_ids = ids_mapping[:, 0].tolist()
words_ids: list[int] = ids_mapping[:, 0].tolist() # type: ignore[assignment]
sentence_result: dict[str, WordEmbedding] = {}
words = [self.vocab_resolver.lookup_word(word_id) for word_id in words_ids]
for word, word_id, emb in zip(words, words_ids, minicoil_embeddings.tolist()):
for word, word_id, emb in zip(words, words_ids, minicoil_embeddings.tolist()): # type: ignore[arg-type]
if word_id == 0:
continue
@@ -310,7 +310,7 @@ class MiniCOIL(SparseTextEmbeddingBase, OnnxTextModel[SparseEmbedding]):
forms=forms[word],
count=int(counts[word_id]),
word_id=int(word_id),
embedding=emb,
embedding=emb, # type: ignore[arg-type]
)
for oov_word, count in oov.items():

3934
poetry.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "fastembed"
version = "0.6.1"
version = "0.7.0"
description = "Fast, light, accurate library built for retrieval embedding generation"
authors = ["Qdrant Team <info@qdrant.tech>", "NirantK <nirant.bits@gmail.com>"]
license = "Apache License"
@@ -20,10 +20,8 @@ numpy = [
]
onnxruntime = [
{ version = ">=1.17.0,<1.20.0", python = "<3.10" },
{ version = ">1.20.0,<1.22.0", python = ">=3.13", markers = "sys_platform == 'win32'" },
{ version = ">=1.17.0,!=1.20.0,<1.22.0", python = ">=3.10,<3.13", markers = "sys_platform == 'win32'" },
{ version = ">1.20.0", python = ">=3.13", markers = "sys_platform != 'win32'" },
{ version = ">=1.17.0,!=1.20.0", python = ">=3.10,<3.13", markers = "sys_platform != 'win32'" },
{ version = ">1.20.0", python = ">=3.13" },
{ version = ">=1.17.0,!=1.20.0", python = ">=3.10,<3.13" },
]
tqdm = "^4.66"
requests = "^2.31"