Skip to content

Commit c79a246

Browse files
committed
chore: remove deprecated methods from ContextRecall and ContextPrecision classes
1 parent c1338ad commit c79a246

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

src/ragas/metrics/_context_precision.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
)
1919
from ragas.prompt import PydanticPrompt
2020
from ragas.run_config import RunConfig
21-
from ragas.utils import deprecated
2221

2322
if t.TYPE_CHECKING:
2423
from langchain_core.callbacks import Callbacks
@@ -317,12 +316,6 @@ async def _single_turn_ascore(
317316
) -> float:
318317
return await super()._single_turn_ascore(sample, callbacks)
319318

320-
@deprecated(
321-
since="0.2", removal="0.3", alternative="LLMContextPrecisionWithReference"
322-
)
323-
async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float:
324-
return await super()._ascore(row, callbacks)
325-
326319

327320
@dataclass
328321
class ContextUtilization(LLMContextPrecisionWithoutReference):
@@ -333,12 +326,6 @@ async def _single_turn_ascore(
333326
) -> float:
334327
return await super()._single_turn_ascore(sample, callbacks)
335328

336-
@deprecated(
337-
since="0.2", removal="0.3", alternative="LLMContextPrecisionWithoutReference"
338-
)
339-
async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float:
340-
return await super()._ascore(row, callbacks)
341-
342329

343330
context_precision = ContextPrecision()
344331
context_utilization = ContextUtilization()

src/ragas/metrics/_context_recall.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
)
1919
from ragas.prompt import PydanticPrompt
2020
from ragas.run_config import RunConfig
21-
from ragas.utils import deprecated
2221

2322
if t.TYPE_CHECKING:
2423
from langchain_core.callbacks import Callbacks
@@ -161,17 +160,6 @@ async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float:
161160
class ContextRecall(LLMContextRecall):
162161
name: str = "context_recall"
163162

164-
@deprecated(since="0.2", removal="0.3", alternative="LLMContextRecall")
165-
async def _single_turn_ascore(
166-
self, sample: SingleTurnSample, callbacks: Callbacks
167-
) -> float:
168-
row = sample.to_dict()
169-
return await self._ascore(row, callbacks)
170-
171-
@deprecated(since="0.2", removal="0.3", alternative="LLMContextRecall")
172-
async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float:
173-
return await super()._ascore(row, callbacks)
174-
175163

176164
@dataclass
177165
class NonLLMContextRecall(SingleTurnMetric):

0 commit comments

Comments
 (0)