From c55881551fe2b7f4bee2fa28ad6fff45106fc7fc Mon Sep 17 00:00:00 2001 From: Prannaya Date: Fri, 21 Jun 2024 22:34:14 +0800 Subject: [PATCH] fix(judge.llm): rearrange `ABC` and `Generic` in class order --- walledeval/judge/llm/question.py | 2 +- walledeval/judge/llm/system.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/walledeval/judge/llm/question.py b/walledeval/judge/llm/question.py index 534adfc6..a65efc3f 100644 --- a/walledeval/judge/llm/question.py +++ b/walledeval/judge/llm/question.py @@ -22,7 +22,7 @@ Answer in one word Yes or No:""" -class QuestionLLMasaJudge(LLMasaJudge[O], Generic[O], ABC): +class QuestionLLMasaJudge(LLMasaJudge[O], ABC, Generic[O]): def __init__(self, name: str, llm: LLM, template: str): super().__init__(name, llm) self.template = template diff --git a/walledeval/judge/llm/system.py b/walledeval/judge/llm/system.py index 2ef0ad80..18eb7e70 100644 --- a/walledeval/judge/llm/system.py +++ b/walledeval/judge/llm/system.py @@ -11,7 +11,7 @@ O = TypeVar("O") # Output Field -class SystemLLMasaJudge(LLMasaJudge[O], Generic[O], ABC): +class SystemLLMasaJudge(LLMasaJudge[O], ABC, Generic[O]): def generate(self, response: str, system: str) -> str: return self._llm.generate([ {