Skip to content

Commit 8fed473

Browse files
committed
Remove use_hhem, pytorch is hard to install in cpu-only linux aarch64
1 parent 6162a07 commit 8fed473

File tree

5 files changed

+3
-394
lines changed

5 files changed

+3
-394
lines changed

evaluators/ragas/langevals_ragas/faithfulness.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
prepare_llm,
2020
)
2121
from pydantic import Field
22-
from ragas.metrics import Faithfulness, FaithfulnesswithHHEM
22+
from ragas.metrics import Faithfulness
2323
from langchain_core.prompt_values import StringPromptValue
2424

2525

@@ -37,10 +37,6 @@ class RagasFaithfulnessResult(EvaluationResult):
3737

3838

3939
class RagasFaithfulnessSettings(RagasSettings):
40-
use_hhem: bool = Field(
41-
default=False,
42-
description="Whether to use Vectara's HHEM-2.1-Open for faithfulness scoring.",
43-
)
4440
autodetect_dont_know: bool = Field(
4541
default=True,
4642
description="Whether to autodetect 'I don't know' in the output to avoid failing the evaluation.",
@@ -63,11 +59,6 @@ class RagasFaithfulnessEvaluator(
6359
docs_url = "https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/faithfulness/"
6460
is_guardrail = False
6561

66-
@classmethod
67-
def preload(cls):
68-
cls.faithfulnessHHEM = FaithfulnesswithHHEM()
69-
super().preload()
70-
7162
def evaluate(self, entry: RagasFaithfulnessEntry) -> SingleEvaluationResult:
7263
llm, _ = prepare_llm(self, self.settings)
7364

@@ -81,7 +72,7 @@ def evaluate(self, entry: RagasFaithfulnessEntry) -> SingleEvaluationResult:
8172
if skip:
8273
return skip
8374

84-
scorer = self.faithfulnessHHEM if self.settings.use_hhem else Faithfulness()
75+
scorer = Faithfulness()
8576
scorer.llm = llm
8677

8778
_original_create_statements = scorer._create_statements

0 commit comments

Comments
 (0)