From 9a6b3bf4decd6e13ff1211ce96986923a8b2b09b Mon Sep 17 00:00:00 2001 From: Soumik Rakshit <19soumik.rakshit96@gmail.com> Date: Thu, 31 Oct 2024 12:30:23 +0000 Subject: [PATCH] fix: bug in OpenAIJudge.extract_prompt_parts --- hemm/metrics/vqa/judges/mmllm_judges/openai_judge.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hemm/metrics/vqa/judges/mmllm_judges/openai_judge.py b/hemm/metrics/vqa/judges/mmllm_judges/openai_judge.py index a16e946..7faff9c 100644 --- a/hemm/metrics/vqa/judges/mmllm_judges/openai_judge.py +++ b/hemm/metrics/vqa/judges/mmllm_judges/openai_judge.py @@ -84,10 +84,10 @@ def extract_prompt_parts(self, prompt: str) -> List[TaggedPromptParts]: adjective = adjective.replace("the ", "") adjective = adjective.replace("a ", "") adjective = adjective.replace("an ", "") + tagged_prompt_parts.append( + TaggedPromptParts(entity=chunk_np, noun=noun, adjective=adjective) + ) break - tagged_prompt_parts.append( - TaggedPromptParts(entity=chunk_np, noun=noun, adjective=adjective) - ) return tagged_prompt_parts @weave.op()