Skip to content

Commit 3621021

Browse files
committed
Typing fix again
1 parent 4009b4d commit 3621021

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

fastembed/common/model_management.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,11 @@ def decompress_to_cache(cls, targz_path: str, cache_dir: str) -> str:
295295

296296
@classmethod
297297
def retrieve_model_gcs(
298-
cls, model_name: str, source_url: str, cache_dir: str, local_files_only: bool = False
298+
cls,
299+
model_name: str,
300+
source_url: Optional[str],
301+
cache_dir: str,
302+
local_files_only: bool = False,
299303
) -> Path:
300304
fast_model_name = f"fast-{model_name.split('/')[-1]}"
301305
cache_tmp_dir = Path(cache_dir) / "tmp"

fastembed/late_interaction/colbert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def __init__(
185185
def load_onnx_model(self) -> None:
186186
self._load_onnx_model(
187187
model_dir=self._model_dir,
188-
model_file=self.model_description["model_file"],
188+
model_file=self.model_description.model_file,
189189
threads=self.threads,
190190
providers=self.providers,
191191
cuda=self.cuda,

fastembed/late_interaction_multimodal/colpali.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
119119
def load_onnx_model(self) -> None:
120120
self._load_onnx_model(
121121
model_dir=self._model_dir,
122-
model_file=self.model_description["model_file"],
122+
model_file=self.model_description.model_file,
123123
threads=self.threads,
124124
providers=self.providers,
125125
cuda=self.cuda,
@@ -140,7 +140,7 @@ def _post_process_onnx_image_output(
140140
Iterable[NumpyArray]: Post-processed output as NumPy arrays.
141141
"""
142142
return output.model_output.reshape(
143-
output.model_output.shape[0], -1, self.model_description["dim"]
143+
output.model_output.shape[0], -1, self.model_description.dim
144144
).astype(np.float32)
145145

146146
def _post_process_onnx_text_output(

0 commit comments

Comments
 (0)