Skip to content

Commit 0df605f

Browse files
authored
fix: remove onnxruntime cap as not needed anymore (#517)
* fix: remove onnxruntime cap as not needed anymore * fix: fix mypy complaints in python3.13
1 parent 04bc7a3 commit 0df605f

3 files changed

Lines changed: 3940 additions & 8 deletions

File tree

fastembed/sparse/minicoil.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,13 @@ def _post_process_onnx_output(
295295
)
296296

297297
# Size of counts: (unique_words)
298-
words_ids = ids_mapping[:, 0].tolist()
298+
words_ids: list[int] = ids_mapping[:, 0].tolist() # type: ignore[assignment]
299299

300300
sentence_result: dict[str, WordEmbedding] = {}
301301

302302
words = [self.vocab_resolver.lookup_word(word_id) for word_id in words_ids]
303303

304-
for word, word_id, emb in zip(words, words_ids, minicoil_embeddings.tolist()):
304+
for word, word_id, emb in zip(words, words_ids, minicoil_embeddings.tolist()): # type: ignore[arg-type]
305305
if word_id == 0:
306306
continue
307307

@@ -310,7 +310,7 @@ def _post_process_onnx_output(
310310
forms=forms[word],
311311
count=int(counts[word_id]),
312312
word_id=int(word_id),
313-
embedding=emb,
313+
embedding=emb, # type: ignore[arg-type]
314314
)
315315

316316
for oov_word, count in oov.items():

0 commit comments

Comments
 (0)