Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into math_extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
hynky1999 committed Jan 28, 2025
2 parents 8a161c1 + cb075a5 commit 9d2553e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/lighteval/logging/evaluation_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import torch
from datasets import Dataset, load_dataset
from datasets.utils.metadata import MetadataConfigs
from fsspec import url_to_fs
from huggingface_hub import DatasetCard, DatasetCardData, HfApi, HFSummaryWriter, hf_hub_url

from lighteval.logging.info_loggers import (
Expand All @@ -53,6 +52,11 @@
if is_nanotron_available():
from nanotron.config import GeneralArgs # type: ignore

try:
from fsspec import url_to_fs
except ImportError:
from fsspec.core import url_to_fs


class EnhancedJSONEncoder(json.JSONEncoder):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/lighteval/tasks/default_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6210,7 +6210,7 @@
evaluation_splits=["validation"],
few_shots_split=None,
few_shots_select=None,
generation_size=-1,
generation_size=1,
metric=[
Metrics.exact_match,
Metrics.quasi_exact_match,
Expand Down
3 changes: 2 additions & 1 deletion src/lighteval/tasks/templates/utils/translation_literals.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ def __getattribute__(self, name: str) -> str:
language=Language.UKRAINIAN,
question_word="питання",
answer="відповідь",
confirmation_word="вірно",
confirmation_word="правильно",
yes="так",
no="ні",
also="також",
Expand All @@ -998,6 +998,7 @@ def __getattribute__(self, name: str) -> str:
sentence_space=" ",
colon=":",
semicolon=";",
indices=["А", "Б", "В", "Г", "Д", "Е"],
),
Language.URDU: TranslationLiterals(
language=Language.URDU,
Expand Down
1 change: 0 additions & 1 deletion tests/metrics/test_extractive_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,6 @@ def test_math_extraction_edge_cases(gold, pred, expected):
r"Thus, the answer is $x \in \boxed{(2,12) \cup (12,102)}$",
1,
),
(r"$204$", r"$24+108=204$", 1),
],
)
def test_math_extraction_additional_cases(gold, pred, expected):
Expand Down

0 comments on commit 9d2553e

Please sign in to comment.