Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into add-eval
  • Loading branch information
riship committed Jan 24, 2025
2 parents 111ac71 + bf3b94c commit 45069bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/llm/tech_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ def eval(question: str, pred: str, correct_answer: str):
eval_tuples = []
for test_batch in tqdm(test_loader, desc="Testing"):
preds = (inference_step(model, test_batch))
for question, pred, label in zip(test_batch.question, preds, test_batch.label):
for question, pred, label in zip(test_batch.question, preds,
test_batch.label):
eval_tuples.append((question, pred, label))
for question, pred, label in tqdm(eval_tuples, desc="Eval"):
scores.append(eval(question, pred, label))
Expand Down

0 comments on commit 45069bf

Please sign in to comment.