Skip to content

Fix relational comparisons with different condition counts - #1349

Open
Excelius-Wang wants to merge 1 commit into
huggingface:mainfrom
Excelius-Wang:fix/relational-condition-count
Open

Fix relational comparisons with different condition counts#1349
Excelius-Wang wants to merge 1 commit into
huggingface:mainfrom
Excelius-Wang:fix/relational-condition-count

Conversation

@Excelius-Wang

Copy link
Copy Markdown

What

Prevent chained inequalities with different numbers of relations from being treated as equivalent.

zip() previously compared only the shared pairs, so a < b < c could match a < b < c < d. The comparison now requires both values to be conjunctions with the same number of conditions before comparing each relation.

Testing

  • pytest tests/unit/metrics/test_extractive_match.py -q — 235 passed
  • pytest tests/unit/metrics -q -k "not bleurt and not extractiveness and not pmi_request" — 284 passed
  • ruff format --check src/lighteval/metrics/utils/math_comparison.py tests/unit/metrics/test_extractive_match.py
  • ruff check src/lighteval/metrics/utils/math_comparison.py tests/unit/metrics/test_extractive_match.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant