From 9a4ac840626b17aa7d9ab400f1911488ba1476d3 Mon Sep 17 00:00:00 2001 From: Ani <115020168+drawbyperpetual@users.noreply.github.com> Date: Fri, 18 Jul 2025 12:40:55 +0200 Subject: [PATCH 1/2] Remove mypy type aliases --- demos/utils/models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/demos/utils/models.py b/demos/utils/models.py index a780b74..e6c66bb 100644 --- a/demos/utils/models.py +++ b/demos/utils/models.py @@ -22,8 +22,8 @@ import jecq import faiss -type Params = list[float] -type Bounds = tuple[float, float] -type BoundsList = list[Bounds] -type Index = faiss.Index | jecq.Index -type ClosestLabels = list[list[int]] +Params = list[float] +Bounds = tuple[float, float] +BoundsList = list[Bounds] +Index = faiss.Index | jecq.Index +ClosestLabels = list[list[int]] From d049bd40f70318b3106511440edd83944682852b Mon Sep 17 00:00:00 2001 From: Ani <115020168+drawbyperpetual@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:33:02 +0200 Subject: [PATCH 2/2] Fix data-type issue with newever version of sentence-transformer --- demos/utils/example_embeddings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/utils/example_embeddings.py b/demos/utils/example_embeddings.py index 788b7bd..71dfa13 100644 --- a/demos/utils/example_embeddings.py +++ b/demos/utils/example_embeddings.py @@ -50,7 +50,7 @@ def get_example_embeddings( ds = load_dataset(path, name, split=f"train[:{num_texts}]", cache_dir=cache_dir) - texts = ds[feature_name] + texts = list(ds[feature_name]) sanitized_path = path.replace("/", "_") normalize = True