repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/metrics/llm_as_a_judge.py | src/euroeval/metrics/llm_as_a_judge.py | """Metrics based on LLM-as-a-judge."""
import collections.abc as c
import logging
import typing as t
from pathlib import Path
from pydantic import BaseModel, Field
from ..exceptions import InvalidBenchmark
from ..logging_utils import log
from ..utils import extract_json_dict_from_string
from .base import Metric
if ... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/task_group_utils/text_to_text.py | src/euroeval/task_group_utils/text_to_text.py | """Utility functions related to the text-to-text task group."""
import collections.abc as c
import logging
import typing as t
import numpy as np
from ..constants import METRIC_ATTRIBUTES_TAKING_UP_MEMORY
from ..exceptions import InvalidBenchmark
from ..logging_utils import log
from ..metrics import HuggingFaceMetric... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/task_group_utils/sequence_classification.py | src/euroeval/task_group_utils/sequence_classification.py | """Utility functions related to the sequence-classification task group."""
import collections.abc as c
import logging
import re
import typing as t
import Levenshtein
import numpy as np
from ..enums import TaskGroup
from ..exceptions import InvalidBenchmark
from ..types import Predictions
from ..utils import (
ex... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/task_group_utils/multiple_choice_classification.py | src/euroeval/task_group_utils/multiple_choice_classification.py | """Utility functions related to the multiple-choice classification task group."""
import hashlib
import re
import typing as t
from collections import defaultdict
import numpy as np
from transformers.trainer import Trainer
from ..exceptions import InvalidBenchmark
if t.TYPE_CHECKING:
from datasets import Dataset... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/task_group_utils/__init__.py | src/euroeval/task_group_utils/__init__.py | """Utility functions related to the different tasks and task groups."""
| python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/task_group_utils/token_classification.py | src/euroeval/task_group_utils/token_classification.py | """Utility functions related to the token-classification task group."""
import collections.abc as c
import logging
import typing as t
from copy import deepcopy
import numpy as np
from ..exceptions import InvalidBenchmark
from ..logging_utils import log
from ..utils import (
extract_json_dict_from_string,
rai... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/task_group_utils/question_answering.py | src/euroeval/task_group_utils/question_answering.py | """Utility functions related to the question-answering task group."""
import collections.abc as c
import typing as t
from collections import defaultdict
import numpy as np
from transformers.tokenization_utils_base import (
PreTrainedTokenizerBase,
TruncationStrategy,
)
from transformers.trainer import Trainer... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/catalan.py | src/euroeval/dataset_configs/catalan.py | """All CATALAN dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import CATALAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
GUIA_CAT_CONFIG = DatasetConfig(
name="guia-cat",
pretty_name="GuiaCat",
source="Eur... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/finnish.py | src/euroeval/dataset_configs/finnish.py | """All Finnish dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import FINNISH
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
SCANDISENT_FI_CONFIG = DatasetConfig(
name="scandisent-fi",
pretty_name... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/spanish.py | src/euroeval/dataset_configs/spanish.py | """All Spanish dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import SPANISH
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
SENTIMENT_HEADLINES_CONFIG = DatasetConfig(
name="sentiment-headlines... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/english.py | src/euroeval/dataset_configs/english.py | """All English dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import ENGLISH
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
SST5_CONFIG = DatasetConfig(
name="sst5",
pretty_name="SST-5",
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/slovene.py | src/euroeval/dataset_configs/slovene.py | """All Slovene dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import SLOVENE
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT
### Official datasets ###
SENTINEWS_CONFIG = DatasetConfig(
name="sentinews",
pretty_name="Sentinews-sl",
source="Eu... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/albanian.py | src/euroeval/dataset_configs/albanian.py | """All Albanian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import ALBANIAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
MMS_SQ_CONFIG = DatasetConfig(
name="mms-sq",
pretty_name="MMS-sq",
source="EuroEv... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/serbian.py | src/euroeval/dataset_configs/serbian.py | """All Serbian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import SERBIAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
MMS_SR_CONFIG = DatasetConfig(
name="mms-sr",
pretty_name="MMS-sr",
source="EuroEval... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/dutch.py | src/euroeval/dataset_configs/dutch.py | """All Dutch dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import DUTCH
from ..tasks import (
COMMON_SENSE,
EUROPEAN_VALUES,
KNOW,
LA,
MCRC,
NER,
RC,
SENT,
SIMPL,
SUMM,
)
### Official datasets ###
DBRD_CONFIG = DatasetConf... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/croatian.py | src/euroeval/dataset_configs/croatian.py | """All Croatian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import CROATIAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT
### Official datasets ###
MMS_HR_CONFIG = DatasetConfig(
name="mms-hr",
pretty_name="MMS-hr",
source="EuroEval/mms... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/romanian.py | src/euroeval/dataset_configs/romanian.py | """All Romanian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import ROMANIAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
ROSENT_CONFIG = DatasetConfig(
name="ro-sent",
pretty_name="RoSent",
source="EuroE... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/slovak.py | src/euroeval/dataset_configs/slovak.py | """All Slovak dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import SLOVAK
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT
### Official datasets ###
CSFD_SENTIMENT_SK_CONFIG = DatasetConfig(
name="csfd-sentiment-sk",
pretty_name="CSFD Sentiment ... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/german.py | src/euroeval/dataset_configs/german.py | """All German dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import GERMAN
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
SB10K_CONFIG = DatasetConfig(
name="sb10k",
pretty_name="SB10K",
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/hungarian.py | src/euroeval/dataset_configs/hungarian.py | """All Hungarian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import HUNGARIAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
HUSST_CONFIG = DatasetConfig(
name="husst",
pretty_name="HuSST",
source="EuroEva... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/faroese.py | src/euroeval/dataset_configs/faroese.py | """All Faroese dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import FAROESE
from ..tasks import LA, NER, RC, SENT
### Official datasets ###
FOSENT_CONFIG = DatasetConfig(
name="fosent",
pretty_name="FoSent",
source="EuroEval/fosent",
task=SENT,
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/portuguese.py | src/euroeval/dataset_configs/portuguese.py | """All Portuguese dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import EUROPEAN_PORTUGUESE, PORTUGUESE
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
SST2_PT_CONFIG = DatasetConfig(
name="sst2... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/french.py | src/euroeval/dataset_configs/french.py | """All French dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import FRENCH
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
ALLOCINE_CONFIG = DatasetConfig(
name="allocine",
pretty_name="Allo... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/ukrainian.py | src/euroeval/dataset_configs/ukrainian.py | """All Ukrainian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import UKRAINIAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
CROSS_DOMAIN_UK_REVIEWS_CONFIG = DatasetConfig(
name="cross-domain-uk-reviews",
pret... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/czech.py | src/euroeval/dataset_configs/czech.py | """All Czech dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import CZECH
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
CSFD_SENTIMENT_CONFIG = DatasetConfig(
name="csfd-sentiment",
pretty_name="CSFD Sentiment",
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/estonian.py | src/euroeval/dataset_configs/estonian.py | """All Estonian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import ESTONIAN
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
ESTONIAN_VALENCE_CONFIG = DatasetConfig(
name="estonian-valence",
pre... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/latvian.py | src/euroeval/dataset_configs/latvian.py | """All Latvian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import LATVIAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
LATVIAN_TWITTER_SENTIMENT_CONFIG = DatasetConfig(
name="latvian-twitter-sentiment",
pret... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/bosnian.py | src/euroeval/dataset_configs/bosnian.py | """All Bosnian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import BOSNIAN
from ..tasks import NER, RC, SENT, SUMM
### Official datasets ###
MMS_BS_CONFIG = DatasetConfig(
name="mms-bs",
pretty_name="MMS-bs",
source="EuroEval/mms-bs-mini",
task=... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/__init__.py | src/euroeval/dataset_configs/__init__.py | """All dataset configurations used in EuroEval."""
from pathlib import Path
from ..data_models import DatasetConfig
from ..languages import get_all_languages
from ..tasks import SPEED
from ..utils import load_custom_datasets_module
from .albanian import * # noqa: F403
from .bosnian import * # noqa: F403
from .bulga... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/greek.py | src/euroeval/dataset_configs/greek.py | """All Greek dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import GREEK
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
GREEK_SA_CONFIG = DatasetConfig(
name="greek-sa",
pretty_name="Greek Sentiment Analysis",
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/norwegian.py | src/euroeval/dataset_configs/norwegian.py | """All Norwegian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import NORWEGIAN, NORWEGIAN_BOKMÅL, NORWEGIAN_NYNORSK
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
NOREC_CONFIG = DatasetConfig(
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/bulgarian.py | src/euroeval/dataset_configs/bulgarian.py | """All Bulgarian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import BULGARIAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT
### Official datasets ###
CINEXIO_CONFIG = DatasetConfig(
name="cinexio",
pretty_name="Cinexio",
source="EuroEva... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/icelandic.py | src/euroeval/dataset_configs/icelandic.py | """All Icelandic dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import ICELANDIC
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
HOTTER_AND_COLDER_SENTIMENT_CONFIG = DatasetConfig(
name="hotter-... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/lithuanian.py | src/euroeval/dataset_configs/lithuanian.py | """All Lithuanian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import LITHUANIAN
from ..tasks import COMMON_SENSE, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
ATSILIEPIMAI_CONFIG = DatasetConfig(
name="atsiliepimai",
pretty_name="Atsiliepima... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/polish.py | src/euroeval/dataset_configs/polish.py | """All Polish dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import POLISH
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, NER, RC, SENT, SUMM
### Official datasets ###
POLEMO2_CONFIG = DatasetConfig(
name="polemo2",
pretty_name="Polemo2",
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/swedish.py | src/euroeval/dataset_configs/swedish.py | """All Swedish dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import SWEDISH
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
SWEREC_CONFIG = DatasetConfig(
name="swerec",
pretty_name="SweReC... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/italian.py | src/euroeval/dataset_configs/italian.py | """All Italian dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import ITALIAN
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
SENTIPOLC_CONFIG = DatasetConfig(
name="sentipolc16",
pretty_name... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/dataset_configs/danish.py | src/euroeval/dataset_configs/danish.py | """All Danish dataset configurations used in EuroEval."""
from ..data_models import DatasetConfig
from ..languages import DANISH
from ..tasks import COMMON_SENSE, EUROPEAN_VALUES, KNOW, LA, MCRC, NER, RC, SENT, SUMM
### Official datasets ###
ANGRY_TWEETS_CONFIG = DatasetConfig(
name="angry-tweets",
pretty_na... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/reading_comprehension.py | src/euroeval/prompt_templates/reading_comprehension.py | """Templates for the Reading Comprehension task."""
import typing as t
from ..data_models import PromptConfig
from ..languages import (
ALBANIAN,
BOSNIAN,
BULGARIAN,
CATALAN,
CROATIAN,
CZECH,
DANISH,
DUTCH,
ENGLISH,
ESTONIAN,
FAROESE,
FINNISH,
FRENCH,
GERMAN,
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/linguistic_acceptability.py | src/euroeval/prompt_templates/linguistic_acceptability.py | """Templates for the Linguistic Acceptability task."""
import typing as t
from ..data_models import PromptConfig
from ..languages import (
ALBANIAN,
BULGARIAN,
CATALAN,
CROATIAN,
CZECH,
DANISH,
DUTCH,
ENGLISH,
ESTONIAN,
FAROESE,
FINNISH,
FRENCH,
GERMAN,
GREEK,
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/__init__.py | src/euroeval/prompt_templates/__init__.py | """The different prompt templates used in EuroEval."""
from .classification import CLASSIFICATION_TEMPLATES
from .linguistic_acceptability import LA_TEMPLATES
from .multiple_choice import MULTIPLE_CHOICE_TEMPLATES
from .named_entity_recognition import NER_TEMPLATES
from .reading_comprehension import RC_TEMPLATES
from ... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/classification.py | src/euroeval/prompt_templates/classification.py | """Templates for the classification task."""
import typing as t
from ..data_models import PromptConfig
from ..languages import (
BULGARIAN,
CZECH,
DANISH,
DUTCH,
ENGLISH,
ESTONIAN,
FAROESE,
FINNISH,
FRENCH,
GERMAN,
GREEK,
ICELANDIC,
ITALIAN,
LATVIAN,
LITHUAN... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/summarization.py | src/euroeval/prompt_templates/summarization.py | """Templates for the Summarization task."""
import typing as t
from ..data_models import PromptConfig
from ..languages import (
ALBANIAN,
BOSNIAN,
CATALAN,
CZECH,
DANISH,
DUTCH,
ENGLISH,
ESTONIAN,
FINNISH,
FRENCH,
GERMAN,
GREEK,
HUNGARIAN,
ICELANDIC,
ITALIAN... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/named_entity_recognition.py | src/euroeval/prompt_templates/named_entity_recognition.py | """Templates for the Named Entity Recognition task."""
import typing as t
from ..data_models import PromptConfig
from ..languages import (
ALBANIAN,
BOSNIAN,
BULGARIAN,
CATALAN,
CROATIAN,
CZECH,
DANISH,
DUTCH,
ENGLISH,
ESTONIAN,
FAROESE,
FINNISH,
FRENCH,
GERMAN,... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/token_classification.py | src/euroeval/prompt_templates/token_classification.py | """Templates for the token classification task."""
import typing as t
from ..data_models import PromptConfig
from ..languages import (
BULGARIAN,
CZECH,
DANISH,
DUTCH,
ENGLISH,
ESTONIAN,
FAROESE,
FINNISH,
FRENCH,
GERMAN,
GREEK,
ICELANDIC,
ITALIAN,
LATVIAN,
L... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/multiple_choice.py | src/euroeval/prompt_templates/multiple_choice.py | """Templates for all multiple choice tasks."""
import typing as t
from ..data_models import PromptConfig
from ..languages import (
ALBANIAN,
BULGARIAN,
CATALAN,
CROATIAN,
CZECH,
DANISH,
DUTCH,
ENGLISH,
ESTONIAN,
FINNISH,
FRENCH,
GERMAN,
GREEK,
HUNGARIAN,
ICE... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/simplification.py | src/euroeval/prompt_templates/simplification.py | """Templates for the Simplification task."""
from ..data_models import PromptConfig
from ..languages import DUTCH, ENGLISH
SIMPL_TEMPLATES = {
ENGLISH: PromptConfig(
default_prompt_prefix="The following are documents with accompanying "
"simplifications.",
default_prompt_template="Document... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/src/euroeval/prompt_templates/sentiment_classification.py | src/euroeval/prompt_templates/sentiment_classification.py | """Templates for the Sentiment Analysis task."""
import typing as t
from ..data_models import PromptConfig
from ..languages import (
ALBANIAN,
BOSNIAN,
BULGARIAN,
CATALAN,
CROATIAN,
CZECH,
DANISH,
DUTCH,
ENGLISH,
ESTONIAN,
FAROESE,
FINNISH,
FRENCH,
GERMAN,
G... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_model_config.py | tests/test_model_config.py | """Tests for the `model_config` module."""
import pytest
from euroeval.data_models import BenchmarkConfig, ModelConfig
from euroeval.exceptions import InvalidModel
from euroeval.model_config import get_model_config
@pytest.mark.parametrize(
argnames=["model_id", "should_raise"],
argvalues=[
("Malteh... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_data_models.py | tests/test_data_models.py | """Tests for the `data_models` module."""
import inspect
import json
from collections.abc import Generator
from pathlib import Path
import pytest
from click import ParamType
from euroeval import __version__, data_models, enums
from euroeval.benchmarker import Benchmarker
from euroeval.data_models import BenchmarkCon... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_model_loading.py | tests/test_model_loading.py | """Tests for the `model_loading` module."""
from pathlib import Path
from shutil import rmtree
import pytest
import torch
from euroeval.data_models import BenchmarkConfig
from euroeval.dataset_configs import get_dataset_config
from euroeval.exceptions import InvalidBenchmark
from euroeval.model_config import get_mod... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_data_loading.py | tests/test_data_loading.py | """Tests for the `data_loading` module."""
import os
from collections.abc import Generator
from functools import partial
from pathlib import Path
import pytest
from datasets import DatasetDict
from numpy.random import default_rng
from transformers.models.auto.tokenization_auto import AutoTokenizer
from euroeval.benc... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_finetuning.py | tests/test_finetuning.py | """Tests for the `finetuning` module."""
import pytest
import torch
from transformers.trainer_utils import IntervalStrategy
from transformers.training_args import TrainingArguments
from euroeval.data_models import BenchmarkConfig, ModelConfig
from euroeval.enums import DataType
from euroeval.finetuning import get_tra... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_dataset_configs.py | tests/test_dataset_configs.py | """Tests for the `dataset_configs` module."""
from collections import defaultdict
from pathlib import Path
from typing import Generator
import pytest
from euroeval import dataset_configs as dc_module
from euroeval.data_models import DatasetConfig
from euroeval.dataset_configs import get_all_dataset_configs, get_data... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_utils.py | tests/test_utils.py | """Tests for the `utils` module."""
import random
import numpy as np
import pytest
import torch
from euroeval.data_models import ModelIdComponents
from euroeval.utils import enforce_reproducibility, scramble, split_model_id, unscramble
class TestEnforceReproducibility:
"""Tests for the `enforce_reproducibility... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_languages.py | tests/test_languages.py | """Tests for the `languages` module."""
from typing import Generator
import pytest
from euroeval.data_models import Language
from euroeval.languages import get_all_languages
class TestGetAllLanguages:
"""Tests for the `get_all_languages` function."""
@pytest.fixture(scope="class")
def languages(self) ... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_benchmark_config_factory.py | tests/test_benchmark_config_factory.py | """Tests for the `benchmark_config_factory` module."""
from pathlib import Path
from typing import Generator
import pytest
import torch
from euroeval.benchmark_config_factory import (
get_correct_language_codes,
prepare_dataset_configs,
prepare_device,
prepare_languages,
)
from euroeval.data_models i... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_types.py | tests/test_types.py | """Tests for the `types` module."""
import pytest
from euroeval.types import is_list_of_int, is_list_of_list_of_int, is_list_of_str
@pytest.mark.parametrize(
argnames=["obj", "expected"],
argvalues=[
([1, 2, 3], True),
([1.0, 2.0, 3.0], False),
(["a", "b", "c"], False),
(["a"... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_constants.py | tests/test_constants.py | """Tests for the `constants` module."""
from typing import TypeVar
from euroeval import constants
from euroeval.data_models import Task
def test_all_objects_in_constants_are_constants() -> None:
"""Test that all objects in the `constants` module are constants."""
for name in dir(constants):
if name.... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_cli.py | tests/test_cli.py | """Tests for the `cli` module."""
from click.types import ParamType
def test_cli_param_names(cli_params: dict[str, ParamType]) -> None:
"""Test that the CLI parameters have the correct names."""
assert set(cli_params.keys()) == {
"model",
"task",
"language",
"dataset",
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/conftest.py | tests/conftest.py | """General fixtures used throughout test modules."""
import collections.abc as c
import os
import sys
from pathlib import Path
from typing import Generator
import pytest
import torch
from click import ParamType
from euroeval.cli import benchmark
from euroeval.data_models import BenchmarkConfig, DatasetConfig, ModelC... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_callbacks.py | tests/test_callbacks.py | """Tests for the `callbacks` module."""
from dataclasses import dataclass
from typing import Generator
import pytest
from datasets import Dataset
from torch.utils.data import DataLoader
from transformers.trainer_callback import TrainerControl, TrainerState
from transformers.training_args import TrainingArguments
fro... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_scores.py | tests/test_scores.py | """Tests for the `scores` module."""
from typing import Generator
import numpy as np
import pytest
from euroeval.metrics import Metric
from euroeval.scores import aggregate_scores, log_scores
from euroeval.types import ScoreDict
@pytest.fixture(scope="module")
def scores(metric: Metric) -> Generator[list[dict[str,... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/__init__.py | tests/__init__.py | """Tests for the EuroEval package."""
| python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_tokenisation_utils.py | tests/test_tokenisation_utils.py | """Tests for the `tokenisation_utils` module."""
import pytest
from transformers.models.auto.tokenization_auto import AutoTokenizer
from euroeval.benchmark_modules.hf import load_hf_model_config
from euroeval.data_models import HashableDict
from euroeval.tokenisation_utils import (
get_end_of_chat_token_ids,
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_benchmarker.py | tests/test_benchmarker.py | """Tests for the `benchmarker` module."""
import logging
import os
import time
from collections.abc import Generator
from dataclasses import replace
from pathlib import Path
from shutil import rmtree
import pytest
import torch
from requests.exceptions import RequestException
from euroeval.benchmarker import (
Be... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_exceptions.py | tests/test_exceptions.py | """Tests for the `exceptions` module."""
import inspect
from euroeval import exceptions
def test_all_classes_are_exceptions() -> None:
"""Test that all classes in `exceptions` are exceptions."""
all_classes = [
getattr(exceptions, obj_name)
for obj_name in dir(exceptions)
if not obj_... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_enums.py | tests/test_enums.py | """Tests for the `enums` module."""
import enum
import inspect
from euroeval import enums
def test_all_classes_are_enums() -> None:
"""Test that all classes in `enums` are Enums."""
all_classes = [
getattr(enums, obj_name)
for obj_name in dir(enums)
if not obj_name.startswith("_")
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_speed_benchmark.py | tests/test_speed_benchmark.py | """Tests for the `speed_benchmark` module."""
import collections.abc as c
from typing import Generator
import pytest
from tqdm.auto import tqdm
from euroeval.benchmark_modules.base import BenchmarkModule
from euroeval.benchmark_modules.hf import HuggingFaceEncoderModel
from euroeval.data_models import BenchmarkConfi... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_benchmark_modules/test_hf.py | tests/test_benchmark_modules/test_hf.py | """Unit tests for the `hf` module."""
import hashlib
from unittest.mock import MagicMock, patch
import pytest
import torch
from huggingface_hub.hf_api import HfApi
from euroeval.benchmark_modules.hf import get_dtype, get_model_repo_info
from euroeval.data_models import BenchmarkConfig
@pytest.mark.parametrize(
... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_benchmark_modules/__init__.py | tests/test_benchmark_modules/__init__.py | """Tests for the `benchmark_modules` subpackage."""
| python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_scripts/__init__.py | tests/test_scripts/__init__.py | """Tests for scripts."""
| python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_scripts/test_create_scala/test_create_scala.py | tests/test_scripts/test_create_scala/test_create_scala.py | """Tests for scripts/create_scala.py."""
import re
from pathlib import Path
import pytest
from pytest import FixtureRequest
from scripts.create_scala import prepare_df
from scripts.load_ud_pos import load_ud_pos
@pytest.fixture(scope="module")
def scala_test_data_path(request: FixtureRequest) -> Path:
"""Path ... | python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
EuroEval/EuroEval | https://github.com/EuroEval/EuroEval/blob/34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f/tests/test_scripts/test_create_scala/__init__.py | tests/test_scripts/test_create_scala/__init__.py | """Tests for create_scala.py."""
| python | MIT | 34d4bf5c2cf4d62b4efd46b1b65d5b814771e25f | 2026-01-05T07:08:43.007726Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/setup.py | setup.py | from setuptools import setup
setup()
| python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/tests/test_samplegrad.py | tests/test_samplegrad.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from torchsso.autograd import save_sample_grads
class LeNet5BatchNorm(nn.Module):
def __init__(self, num_classes=10, affine=True):
super().__init__()
self.conv1 = nn.Conv2d(3, 6, 5)
self.bn1 = nn.BatchNorm2d(6, affine=affi... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/__init__.py | torchsso/__init__.py | from torchsso import optim # NOQA
from torchsso import autograd # NOQA
from torchsso import utils # NOQA
from torchsso.curv.curvature import Curvature, DiagCurvature, KronCurvature # NOQA
from torchsso.curv.cov.linear import CovLinear, DiagCovLinear, KronCovLinear # NOQA
from torchsso.curv.cov.conv import CovConv... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/curvature.py | torchsso/curv/curvature.py | import math
import torch
import torch.nn as nn
import torchsso
PI_TYPE_TRACENORM = 'tracenorm'
class Curvature(object):
r"""Base implementation of the curvatures for each layer.
This class computes/maintains curvature (data) and EMA/inverse of it for a given layer (module)
which are used for torchs... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/__init__.py | torchsso/curv/__init__.py | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false | |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/hessian/conv.py | torchsso/curv/hessian/conv.py | from torchsso import KronCovConv2d, KronHessian
class KronHessianConv2d(KronCovConv2d, KronHessian):
def __init__(self, module, ema_decay=1., damping=0, post_curv=None, recursive_approx=False):
KronHessian.__init__(self, module, ema_decay, damping, post_curv, recursive_approx)
def update_in_... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/hessian/__init__.py | torchsso/curv/hessian/__init__.py | import torch
from torchsso import KronCurvature
class KronHessian(KronCurvature):
def update_in_forward(self, input_data):
raise NotImplementedError
def update_in_backward(self, grad_output):
output = getattr(self._module, 'data_output')
device = grad_output.device
n = grad_... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/hessian/linear.py | torchsso/curv/hessian/linear.py | from torchsso import KronCovLinear, KronHessian
class KronHessianLinear(KronCovLinear, KronHessian):
def __init__(self, module, ema_decay=1., damping=0, post_curv=None, recursive_approx=False):
KronHessian.__init__(self, module, ema_decay, damping, post_curv, recursive_approx)
def update_in_backward... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/cov/conv.py | torchsso/curv/cov/conv.py | from torchsso import Curvature, DiagCurvature, KronCurvature
import torch
import torch.nn.functional as F
class CovConv2d(Curvature):
def update_in_backward(self, grad_output):
pass
def precgrad(self, params):
pass
class DiagCovConv2d(DiagCurvature):
def update_in_backward(self, grad_... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/cov/__init__.py | torchsso/curv/cov/__init__.py | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false | |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/cov/batchnorm.py | torchsso/curv/cov/batchnorm.py | from torchsso import Curvature, DiagCurvature
class CovBatchNorm1d(Curvature):
def update_in_backward(self, grad_output_data):
pass
class DiagCovBatchNorm1d(DiagCurvature):
def update_in_backward(self, grad_output):
data_input = getattr(self._module, 'data_input', None) # n x f
as... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/cov/linear.py | torchsso/curv/cov/linear.py | import torch
from torchsso import Curvature, DiagCurvature, KronCurvature
class CovLinear(Curvature):
def update_in_backward(self, grad_output):
data_input = getattr(self._module, 'data_input', None) # n x f_in
assert data_input is not None
n = data_input.shape[0]
if self.bias:... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/fisher/conv.py | torchsso/curv/fisher/conv.py | from torchsso import DiagCovConv2d, KronCovConv2d, Fisher
import torch
import torch.nn.functional as F
class DiagFisherConv2d(DiagCovConv2d, Fisher):
def __init__(self, *args, **kwargs):
DiagCovConv2d.__init__(self, *args, **kwargs)
Fisher.__init__(self)
def update_in_backward(self, grad_out... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/fisher/__init__.py | torchsso/curv/fisher/__init__.py | import torch
import torch.nn.functional as F
from torchsso.utils import TensorAccumulator
class Fisher(object):
def __init__(self):
self.prob = None
self._do_backward = True
self._acc_cov = TensorAccumulator()
@property
def do_backward(self):
return self._do_backward
... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/fisher/batchnorm.py | torchsso/curv/fisher/batchnorm.py | import torch
from torchsso import DiagCovBatchNorm2d, Fisher
class DiagFisherBatchNorm2d(DiagCovBatchNorm2d, Fisher):
def __init__(self, *args, **kwargs):
DiagCovBatchNorm2d.__init__(self, *args, **kwargs)
Fisher.__init__(self)
def update_in_backward(self, grad_out):
if self.do_backw... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/curv/fisher/linear.py | torchsso/curv/fisher/linear.py | import torch
from torchsso import DiagCovLinear, KronCovLinear, Fisher
class DiagFisherLinear(DiagCovLinear, Fisher):
def __init__(self, *args, **kwargs):
DiagCovLinear.__init__(self, *args, **kwargs)
Fisher.__init__(self)
def update_in_backward(self, grad_output):
if self.do_backwar... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/optim/secondorder.py | torchsso/optim/secondorder.py | from collections import defaultdict
import math
import numpy as np
import torch
import torch.nn as nn
from torch.optim import Optimizer
import torchsso
from torchsso.utils import TensorAccumulator
from torchsso.utils.chainer_communicators import create_communicator
from torchsso.utils.chainer_communicators import _ut... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/optim/vi.py | torchsso/optim/vi.py | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchsso.optim import SecondOrderOptimizer, DistributedSecondOrderOptimizer
from torchsso.utils import TensorAccumulator
from torchsso.utils.chainer_communicators import _utility
class VIOptimizer(SecondOrderOptimizer):
r"""An op... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/optim/__init__.py | torchsso/optim/__init__.py | from torchsso.optim.firstorder import DistributedFirstOrderOptimizer # NOQA
from torchsso.optim.secondorder import SecondOrderOptimizer, DistributedSecondOrderOptimizer # NOQA
from torchsso.optim.vi import VIOptimizer, DistributedVIOptimizer, VOGN # NOQA
from torchsso.optim import lr_scheduler # NOQA
| python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/optim/firstorder.py | torchsso/optim/firstorder.py | from torch.optim import Optimizer
from torch.nn.utils import parameters_to_vector, vector_to_parameters
class DistributedFirstOrderOptimizer(Optimizer):
def __init__(self, optimizer, model, dist, lars=False):
super(DistributedFirstOrderOptimizer, self).__setattr__(
'actual_optimizer', optimize... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/optim/lr_scheduler.py | torchsso/optim/lr_scheduler.py | from torch.optim import Optimizer
class _IterLRScheduler(object):
def __init__(self, optimizer, last_iter=-1):
if not isinstance(optimizer, Optimizer):
raise TypeError('{} is not an Optimizer'.format(
type(optimizer).__name__))
self.optimizer = optimizer
if last... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/utils/accumulator.py | torchsso/utils/accumulator.py | from torch import Tensor
class TensorAccumulator(object):
def __init__(self):
self._accumulation = None
def check_type(self, data):
accumulation = self._accumulation
if isinstance(data, list):
assert type(data[0]) == Tensor, 'the type of data has to be list of torch.Tens... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/utils/logger.py | torchsso/utils/logger.py | import os
import time
import json
import shutil
# Select the best-resolution timer function
try:
_get_time = time.perf_counter
except AttributeError:
if os.name == 'nt':
_get_time = time.clock
else:
_get_time = time.time
class Logger(object):
def __init__(self, out, logname):
... | python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/utils/cupy.py | torchsso/utils/cupy.py | try:
import cupy
except:
# print("No cupy detected")
pass
from torch.utils.dlpack import to_dlpack, from_dlpack
def to_cupy(m_tensor):
return cupy.fromDlpack(to_dlpack(m_tensor))
def from_cupy(m_cp):
return from_dlpack(m_cp.toDlpack())
| python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/utils/__init__.py | torchsso/utils/__init__.py | from torchsso.utils.logger import Logger # NOQA
from torchsso.utils.inv_cupy import inv # NOQA
from torchsso.utils.cholesky_cupy import cholesky # NOQA
from torchsso.utils.accumulator import TensorAccumulator # NOQA
| python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
cybertronai/pytorch-sso | https://github.com/cybertronai/pytorch-sso/blob/d16173236728fdd1e943bc3b61243bfb28f95348/torchsso/utils/cholesky_cupy.py | torchsso/utils/cholesky_cupy.py | try:
import cupy
from torchsso.utils.cupy import to_cupy, from_cupy
except:
# print("No cupy detected")
pass
def cholesky(m, upper=True):
m_cp = to_cupy(m)
m_chl_cp = cupy.linalg.decomposition.cholesky(m_cp)
if upper:
m_chl_cp = m_chl_cp.transpose()
return from_cupy(m_chl_cp)
| python | MIT | d16173236728fdd1e943bc3b61243bfb28f95348 | 2026-01-05T07:09:14.666019Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.