From a47f01edf1252867b9be7b9fb5fc731e7083bba1 Mon Sep 17 00:00:00 2001 From: joshuaswanson Date: Thu, 12 Mar 2026 13:24:52 +0100 Subject: [PATCH] Fix typos in math_comparison.py and sample_comparison.py --- src/lighteval/metrics/utils/math_comparison.py | 2 +- tests/slow_tests/sample_comparison.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lighteval/metrics/utils/math_comparison.py b/src/lighteval/metrics/utils/math_comparison.py index 974d6d2cc..275641731 100644 --- a/src/lighteval/metrics/utils/math_comparison.py +++ b/src/lighteval/metrics/utils/math_comparison.py @@ -496,7 +496,7 @@ def sympy_expr_eq(gold: Basic | MatrixBase, pred: Basic | MatrixBase, precision: except Exception: # noqa: E722 pass - # If the target is relational, but the refernce is not, it's possible it's a case of a=x+1+z, so we just take x+1+z + # If the target is relational, but the reference is not, it's possible it's a case of a=x+1+z, so we just take x+1+z # We only do this if the lhs of the first equation is fully symbolic, to prevent simplifying x+y+2z = 1 if is_assignment_relation(gold) and not is_equation(pred): gold = take_last_relation(gold).rhs diff --git a/tests/slow_tests/sample_comparison.py b/tests/slow_tests/sample_comparison.py index 393d8943f..a5ebcd56e 100644 --- a/tests/slow_tests/sample_comparison.py +++ b/tests/slow_tests/sample_comparison.py @@ -71,7 +71,7 @@ def _compare_model_responses(current, reference): # Special handling for logprobs field if field_name in ["input_tokens", "output_tokens"]: - # input and ouput tokens are lists of tensors, we need to convert + # input and output tokens are lists of tensors, we need to convert # them to plain lists current_val = _to_plain_list(current_val) reference_val = _to_plain_list(reference_val)