diff --git a/python/python/lancedb/rerankers/linear_combination.py b/python/python/lancedb/rerankers/linear_combination.py index 4f4110fa..3eb19b1d 100644 --- a/python/python/lancedb/rerankers/linear_combination.py +++ b/python/python/lancedb/rerankers/linear_combination.py @@ -1,5 +1,3 @@ -from typing import List - import pyarrow as pa from .base import Reranker @@ -112,6 +110,6 @@ class LinearCombinationReranker(Reranker): # these scores represent distance return 1 - (self.weight * score1 + (1 - self.weight) * score2) - def _invert_score(self, scores: List[float]): - # Invert the scores between relevance and distance - return 1 - scores + def _invert_score(self, score: float): + # Invert the score between relevance and distance + return 1 - score