Skip to content

Commit

Permalink
Merge pull request #89 from bcrochet/catch-keyerror
Browse files Browse the repository at this point in the history
fix: catch KeyError in mt_bench_branch
  • Loading branch information
danmcp authored Aug 1, 2024
2 parents 3504b6d + a0c2bc8 commit 4c020b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/instructlab/eval/mt_bench_branch_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def generate(judge_model_name, branch, taxonomy_dir, output_dir):
print(f"failed to load {qna_file}. skipping...")
continue
for ex in examples:
q, a = ex["question"], ex["answer"]
q, a = ex.get("question"), ex.get("answer")
if q is None or a is None:
logger.warning("Skipping malformed file %s", qna_file)
continue

c = ex.get("context")
Expand Down

0 comments on commit 4c020b6

Please sign in to comment.