From 2c8d82916a2c1d24bd4226894a0bfe562cc143fc Mon Sep 17 00:00:00 2001 From: "Shuyue Jia (Bruce)" Date: Mon, 17 Feb 2025 17:43:04 -0500 Subject: [PATCH] Update vllm_utils.py --- PodGPT_Database_Inference/utils/vllm_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PodGPT_Database_Inference/utils/vllm_utils.py b/PodGPT_Database_Inference/utils/vllm_utils.py index c0e83aa..4cfaaa3 100644 --- a/PodGPT_Database_Inference/utils/vllm_utils.py +++ b/PodGPT_Database_Inference/utils/vllm_utils.py @@ -204,8 +204,8 @@ def performance_eval(config, mode, prompts, answers, documents, file_path): option_range = "a-dA-D" # 4 Options prediction = extract_answer(completion=response, option_range=option_range) if prediction is None: - response = response_with_option(prompt=prompt, response=response) - prediction = extract_answer(completion=response, option_range=option_range) + temp_response = response_with_option(prompt=prompt, response=response) + prediction = extract_answer(completion=temp_response, option_range=option_range) if prediction is not None: acc.append(prediction == answer)