Skip to content

Commit 67b7417

Browse files
committed
remove unused comments
1 parent 652e13c commit 67b7417

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Diff for: textgrad/tasks/multimodal/mathvista.py

-5
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ def extract_answer(response, problem, quick_extract=False):
124124
except:
125125
pass
126126

127-
# quick extraction
128127
if quick_extract:
129128
try:
130129
result = re.search(r'The answer is "(.*)"\.', response)
@@ -134,7 +133,6 @@ def extract_answer(response, problem, quick_extract=False):
134133
except Exception as e:
135134
raise Exception(f"Error in extracting answer for {pid}: {e}. Remove this line responsibly.")
136135

137-
# general extraction
138136
try:
139137
from textgrad.engine.openai import ChatOpenAI
140138
local_llm_engine = ChatOpenAI(model_string="gpt-3.5-turbo", is_multimodal=False)
@@ -153,7 +151,6 @@ def get_most_similar(prediction, choices):
153151
distances = [distance(prediction, choice) for choice in choices]
154152
ind = distances.index(min(distances))
155153
return choices[ind]
156-
# return min(choices, key=lambda choice: distance(prediction, choice))
157154

158155

159156
def normalize_extracted_answer(extraction, question_data):
@@ -243,8 +240,6 @@ def __init__(self, evaluation_api:str, root: str=None, split: str="testmini", ta
243240
def __getitem__(self, index):
244241
row = self.data[index]
245242
pid = row["pid"]
246-
# question = row["question"]
247-
# image = row["image"]
248243
decoded_image = row["decoded_image"]
249244
choices = row["choices"]
250245
unit = row["unit"]

0 commit comments

Comments
 (0)