repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_continuation.py
test_continuation_prompt_mcf
assert
collection
35
from lighteval.tasks.templates.continuation import get_continuation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_continuation_prompt_mcf(): """Test multiple-choice format continuation prompt generation."...
[" A", " B", " C"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_continuation.py
test_continuation_prompt_cf
assert
collection
25
from lighteval.tasks.templates.continuation import get_continuation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_continuation_prompt_cf(): """Test cloze format continuation prompt generation.""" test...
[" shining brightly", " setting in the west", " hidden behind clouds"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_continuation.py
test_continuation_prompt_sequence_end
assert
collection
26
from lighteval.tasks.templates.continuation import get_continuation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_continuation_prompt_sequence_end(): """Test continuation prompt generation when the contex...
[" Shining brightly", " Setting in the west", " Hidden behind clouds"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_continuation.py
test_continuation_prompt_mcf
assert
string_literal
23
from lighteval.tasks.templates.continuation import get_continuation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_continuation_prompt_mcf(): """Test multiple-choice format continuation prompt generation."...
"""\ The quick brown fox A. jumps over the lazy dog B. runs through the forest C. chases a rabbit Answer:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_continuation.py
test_continuation_optional_keys
assert
string_literal
28
from lighteval.tasks.templates.continuation import get_continuation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_continuation_optional_keys(): """Test continuation prompt generation with optional instruc...
"""\ Choose the most likely continuation: In the morning, I like to A. drink coffee B. go for a run C. read the news Answer:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_copa.py
test_copa_prompt_cf
assert
string_literal
38
import pytest from lighteval.tasks.templates.copa import get_copa_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation from lighteval.utils.language import Language @pytest.mark.parametrize("cause_effect", ["cause", "effect"]) def test_copa_prompt_cf(cause_effect): """ Tests t...
""
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_copa.py
test_copa_prompt_cf
assert
collection
40
import pytest from lighteval.tasks.templates.copa import get_copa_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation from lighteval.utils.language import Language @pytest.mark.parametrize("cause_effect", ["cause", "effect"]) def test_copa_prompt_cf(cause_effect): """ Tests t...
[0]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_copa.py
test_copa_prompt_cf
assert
string_literal
36
import pytest from lighteval.tasks.templates.copa import get_copa_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation from lighteval.utils.language import Language @pytest.mark.parametrize("cause_effect", ["cause", "effect"]) def test_copa_prompt_cf(cause_effect): """ Tests t...
f"He is strong {cause_effect_word}"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_copa.py
test_copa_prompt_cf
assert
collection
39
import pytest from lighteval.tasks.templates.copa import get_copa_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation from lighteval.utils.language import Language @pytest.mark.parametrize("cause_effect", ["cause", "effect"]) def test_copa_prompt_cf(cause_effect): """ Tests t...
[" he has big muscles", " he is weak"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_hellaswag.py
test_hellaswag_prompt_cf
assert
string_literal
35
from lighteval.tasks.templates.hellaswag import get_hellaswag_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_hellaswag_prompt_cf(): """ Tests that hellaswag prompt function works correctly. Since i...
""
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_hellaswag.py
test_hellaswag_prompt_cf
assert
collection
37
from lighteval.tasks.templates.hellaswag import get_hellaswag_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_hellaswag_prompt_cf(): """ Tests that hellaswag prompt function works correctly. Since i...
[0]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_hellaswag.py
test_hellaswag_prompt_mcf
assert
string_literal
43
from lighteval.tasks.templates.hellaswag import get_hellaswag_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_hellaswag_prompt_mcf(): """ Tests that hellaswag prompt function works correctly. Since ...
"Answer:"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_hellaswag.py
test_hellaswag_prompt_mcf
assert
collection
44
from lighteval.tasks.templates.hellaswag import get_hellaswag_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_hellaswag_prompt_mcf(): """ Tests that hellaswag prompt function works correctly. Since ...
[" A", " B"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_hellaswag.py
test_hellaswag_single_ctx
assert
string_literal
31
from lighteval.tasks.templates.hellaswag import get_hellaswag_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_hellaswag_single_ctx(): """ Tests that hellaswag prompt function works correctly. Since ...
"Fitness:\nHe is strong."
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_hellaswag.py
test_hellaswag_prompt_cf
assert
string_literal
33
from lighteval.tasks.templates.hellaswag import get_hellaswag_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_hellaswag_prompt_cf(): """ Tests that hellaswag prompt function works correctly. Since i...
"Fitness:\nHe is strong he is fast"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_hellaswag.py
test_hellaswag_ctx_joining
assert
string_literal
33
from lighteval.tasks.templates.hellaswag import get_hellaswag_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_hellaswag_ctx_joining(): """ Tests that hellaswag prompt function works correctly. Since...
"Fitness:\nHe is strong. He is fast."
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_hellaswag.py
test_hellaswag_prompt_cf
assert
collection
36
from lighteval.tasks.templates.hellaswag import get_hellaswag_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_hellaswag_prompt_cf(): """ Tests that hellaswag prompt function works correctly. Since i...
[" he has big muscles", " he is weak"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_hellaswag.py
test_hellaswag_prompt_mcf
assert
string_literal
33
from lighteval.tasks.templates.hellaswag import get_hellaswag_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_hellaswag_prompt_mcf(): """ Tests that hellaswag prompt function works correctly. Since ...
"""\ Fitness:\nHe is strong he is fast A. he has big muscles B. he is weak Answer:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_multichoice.py
test_thai_multichoice_prompt
assert
string_literal
32
from lighteval.tasks.templates.multichoice import get_mcq_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_thai_multichoice_prompt(): """Test multichoice prompt generation for Thai language.""" test_inpu...
"คำตอบ:"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_multichoice.py
test_multichoice_prompt_mcf
assert
string_literal
38
from lighteval.tasks.templates.multichoice import get_mcq_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_multichoice_prompt_mcf(): """Test multiple-choice format (MCF) prompt generation for multichoice que...
"Answer:"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_multichoice.py
test_multichoice_prompt_mcf
assert
collection
39
from lighteval.tasks.templates.multichoice import get_mcq_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_multichoice_prompt_mcf(): """Test multiple-choice format (MCF) prompt generation for multichoice que...
[" A", " B", " C", " D"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_multichoice.py
test_multichoice_prompt_nli_cf
assert
collection
34
from lighteval.tasks.templates.multichoice import get_mcq_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_multichoice_prompt_nli_cf(): """Test cloze format (CF) prompt generation for multichoice questions."...
[" London", " Paris", " Berlin", " Madrid"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_multichoice.py
test_chinese_multichoice_prompt
assert
string_literal
20
from lighteval.tasks.templates.multichoice import get_mcq_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_chinese_multichoice_prompt(): """Test multichoice prompt generation for Chinese language.""" tes...
"""\ 问题:什么是中国的首都? A。北京 B。上海 C。广州 D。深圳 答案:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_multichoice.py
test_multichoice_prompt_nli_cf
assert
string_literal
25
from lighteval.tasks.templates.multichoice import get_mcq_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_multichoice_prompt_nli_cf(): """Test cloze format (CF) prompt generation for multichoice questions."...
"""\ Question: What is the capital of France? Answer:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_multichoice.py
test_multichoice_prompt_mcf
assert
string_literal
26
from lighteval.tasks.templates.multichoice import get_mcq_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_multichoice_prompt_mcf(): """Test multiple-choice format (MCF) prompt generation for multichoice que...
"""\ Question: What is the capital of France? A. London B. Paris C. Berlin D. Madrid Answer:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_multichoice.py
test_thai_multichoice_prompt
assert
string_literal
20
from lighteval.tasks.templates.multichoice import get_mcq_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_thai_multichoice_prompt(): """Test multichoice prompt generation for Thai language.""" test_inpu...
"""\ คำถาม: สิ่งใดต่อไปนี้เป็นสิ่งที่คุณชอบมากที่สุด? A. รถยนต์ B. รถจักรยานยนต์ C. รถจักรยานยนต์ D. รถยนต์ คำตอบ:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_multichoice.py
test_multichoice_optional_keys
assert
string_literal
30
from lighteval.tasks.templates.multichoice import get_mcq_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_multichoice_optional_keys(): """Test multichoice prompt generation with optional keys (context and i...
"""\ Please answer the following question about geography. France is big. Question: What is the capital of France? A. London B. Paris C. Berlin D. Madrid Answer:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_cf
assert
numeric_literal
26
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_cf(): """Test cloze format NLI prompt generation.""" test_input = { "premise": "Th...
2
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_mcf
assert
collection
35
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_mcf(): """Test multiple-choice format NLI prompt generation.""" test_input = { "pr...
[2]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_cf
assert
string_literal
24
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_cf(): """Test cloze format NLI prompt generation.""" test_input = { "premise": "Th...
"right?"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_mcf
assert
string_literal
33
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_mcf(): """Test multiple-choice format NLI prompt generation.""" test_input = { "pr...
"Answer:"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_mcf
assert
collection
34
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_mcf(): """Test multiple-choice format NLI prompt generation.""" test_input = { "pr...
[" A", " B", " C"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_hybrid
assert
collection
32
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_hybrid(): """Test hybrid format NLI prompt generation.""" test_input = { "premise...
[" True", " Neither", " False"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_cf
assert
string_literal
23
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_cf(): """Test cloze format NLI prompt generation.""" test_input = { "premise": "Th...
"The cat is sleeping on the couch right?"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_cf
assert
collection
25
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_cf(): """Test cloze format NLI prompt generation.""" test_input = { "premise": "Th...
[" Yes, the cat is awake", " Also, the cat is awake", " No, the cat is awake"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_hybrid
assert
string_literal
23
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_hybrid(): """Test hybrid format NLI prompt generation.""" test_input = { "premise...
"""\ The cat is sleeping on the couch. Question: The cat is awake True, False or Neither? Answer:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_nli.py
test_nli_prompt_mcf
assert
string_literal
22
from lighteval.tasks.templates.nli import get_nli_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, HybridFormulation from lighteval.utils.language import Language def test_nli_prompt_mcf(): """Test multiple-choice format NLI prompt generation.""" test_input = { "pr...
"""\ The cat is sleeping on the couch. Question: The cat is awake. A. True B. Neither C. False Answer:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_cf
assert
string_literal
29
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_cf(): """ Tests that translation prompt function works correctly for ...
""
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_cf
assert
collection
31
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_cf(): """ Tests that translation prompt function works correctly for ...
[0]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_cf
assert
none_literal
26
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_cf(): """ Tests that translation prompt function works correctly for ...
None
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_mcf
assert
string_literal
38
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_mcf(): """ Tests that translation prompt function works correctly for...
"Answer:"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_cf_formatting
assert
collection
31
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_cf_formatting(): """ Tests that translation prompt function works cor...
[" 你好吗?"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_mcf
assert
collection
39
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_mcf(): """ Tests that translation prompt function works correctly for...
[" A", " B"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_cf_formatting
assert
string_literal
29
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_cf_formatting(): """ Tests that translation prompt function works cor...
"EN: How are you? ZH:"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_cf
assert
string_literal
28
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_cf(): """ Tests that translation prompt function works correctly for ...
"CS: Ahoj, jak se máš? FR:"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_cf
assert
collection
30
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_cf(): """ Tests that translation prompt function works correctly for ...
[" Bonjour, comment allez-vous?"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/templates/test_translation.py
test_translation_prompt_mcf
assert
string_literal
29
from lighteval.tasks.templates.translation import get_translation_prompt_function from lighteval.tasks.templates.utils.formulation import CFFormulation, MCFFormulation from lighteval.utils.language import Language def test_translation_prompt_mcf(): """ Tests that translation prompt function works correctly for...
"""\ CS: Ahoj, jak se máš? FR: A. Bonjour, comment allez-vous? B. Ciao, come stai? Answer:\ """
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_lighteval_task.py
test_dataset_filter
assert
numeric_literal
25
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig, extract_num_samples from lighteval.tasks.requests import Doc def dummy_prompt_function(item, task_name): return Doc(query=item["text"], choices=["A", "B"], gold_index=0, task_name=task_name) def test_dataset_filter(): ...
1
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_lighteval_task.py
test_dataset_filter
assert
string_literal
26
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig, extract_num_samples from lighteval.tasks.requests import Doc def dummy_prompt_function(item, task_name): return Doc(query=item["text"], choices=["A", "B"], gold_index=0, task_name=task_name) def test_dataset_filter(): ...
"hi"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_lighteval_task.py
test_extract_num_samples
assert
variable
22
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig, extract_num_samples from lighteval.tasks.requests import Doc def dummy_prompt_function(item, task_name): return Doc(query=item["text"], choices=["A", "B"], gold_index=0, task_name=task_name) @pytest.mark.parametrize( ...
expected
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_lighteval_task.py
test_revision_check
assert
collection
24
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig, extract_num_samples from lighteval.tasks.requests import Doc def dummy_prompt_function(item, task_name): return Doc(query=item["text"], choices=["A", "B"], gold_index=0, task_name=task_name) def test_revision_check(): ...
["hi", "how are you?"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_registry.py
test_superset_with_subset_task
assert
numeric_literal
33
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.registry import Registry TASKS_TABLE = [ LightevalTaskConfig( name="test_task_revision", # Won't be called, so it can be anything prompt_function=lambda x: x, # type: ignore ...
57
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_registry.py
test_invalid_task_creation
pytest.raises
variable
29
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.registry import Registry TASKS_TABLE = [ LightevalTaskConfig( name="test_task_revision", # Won't be called, so it can be anything prompt_function=lambda x: x, # type: ignore ...
ValueError)
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_registry.py
test_task_creation
assert
string_literal
33
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.registry import Registry TASKS_TABLE = [ LightevalTaskConfig( name="test_task_revision", # Won't be called, so it can be anything prompt_function=lambda x: x, # type: ignore ...
"storycloze:2016"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_registry.py
test_custom_task_groups
assert
collection
31
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.registry import Registry TASKS_TABLE = [ LightevalTaskConfig( name="test_task_revision", # Won't be called, so it can be anything prompt_function=lambda x: x, # type: ignore ...
{"custom|test_task_revision"}
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_registry.py
test_custom_tasks
assert
collection
31
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.registry import Registry TASKS_TABLE = [ LightevalTaskConfig( name="test_task_revision", # Won't be called, so it can be anything prompt_function=lambda x: x, # type: ignore ...
["custom|test_task_revision"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_registry.py
test_custom_tasks
assert
collection
32
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.registry import Registry TASKS_TABLE = [ LightevalTaskConfig( name="test_task_revision", # Won't be called, so it can be anything prompt_function=lambda x: x, # type: ignore ...
[{"fewshots": 0, "truncate_fewshots": False}]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_registry.py
test_superset_expansion
assert
collection
32
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.registry import Registry TASKS_TABLE = [ LightevalTaskConfig( name="test_task_revision", # Won't be called, so it can be anything prompt_function=lambda x: x, # type: ignore ...
["lighteval|storycloze:2016", "lighteval|storycloze:2018"]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_registry.py
test_custom_task_groups
assert
collection
32
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.registry import Registry TASKS_TABLE = [ LightevalTaskConfig( name="test_task_revision", # Won't be called, so it can be anything prompt_function=lambda x: x, # type: ignore ...
[ {"fewshots": 0, "truncate_fewshots": False}, {"fewshots": 1, "truncate_fewshots": False}, ]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/tasks/test_registry.py
test_superset_with_subset_task
assert
collection
35
import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.registry import Registry TASKS_TABLE = [ LightevalTaskConfig( name="test_task_revision", # Won't be called, so it can be anything prompt_function=lambda x: x, # type: ignore ...
[ {"fewshots": 3, "truncate_fewshots": False}, {"fewshots": 5, "truncate_fewshots": False}, ]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager.py
test_fewshot_sampler
assert
complex_expr
37
import random import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.prompt_manager import FewShotSampler from lighteval.tasks.requests import Doc @pytest.mark.parametrize("fewshot_select", ["sequential", "random", "balanced"]) def test_fewshot_sampler(fewsho...
task_docs[:20]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager.py
test_fewshot_sampler
assert
func_call
32
import random import pytest from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig from lighteval.tasks.prompt_manager import FewShotSampler from lighteval.tasks.requests import Doc @pytest.mark.parametrize("fewshot_select", ["sequential", "random", "balanced"]) def test_fewshot_sampler(fewsho...
task.fewshot_docs()[:20]
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager_class.py
test_prepare_prompt_chat_template_with_system_prompt
assert
numeric_literal
27
from unittest.mock import Mock import pytest from lighteval.tasks.prompt_manager import PromptManager from lighteval.tasks.requests import Doc class TestPromptManager: def test_prepare_prompt_chat_template_with_system_prompt(self): """Test prepare_prompt with chat template format and system prompt.""" ...
2
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager_class.py
test_prepare_prompt_chat_template_with_fewshot
assert
numeric_literal
32
from unittest.mock import Mock import pytest from lighteval.tasks.prompt_manager import PromptManager from lighteval.tasks.requests import Doc class TestPromptManager: def test_prepare_prompt_chat_template_with_fewshot(self): """Test prepare_prompt with chat template format and few-shot examples.""" ...
3
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager_class.py
test_prepare_prompt_chat_template_with_fewshot_and_instruction_and_system_prompt
assert
numeric_literal
43
from unittest.mock import Mock import pytest from lighteval.tasks.prompt_manager import PromptManager from lighteval.tasks.requests import Doc class TestPromptManager: def test_prepare_prompt_chat_template_with_fewshot_and_instruction_and_system_prompt(self): """Test prepare_prompt with chat template fo...
4
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager_class.py
test_prepare_prompt_multimodal_basic
assert
numeric_literal
31
from unittest.mock import Mock import pytest from lighteval.tasks.prompt_manager import PromptManager from lighteval.tasks.requests import Doc class TestPromptManager: def test_prepare_prompt_multimodal_basic(self): """Test prepare_prompt_multimodal with basic multimodal document.""" tokenizer =...
1
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager_class.py
test_prepare_prompt_chat_template_with_fewshot
assert
string_literal
36
from unittest.mock import Mock import pytest from lighteval.tasks.prompt_manager import PromptManager from lighteval.tasks.requests import Doc class TestPromptManager: def test_prepare_prompt_chat_template_with_fewshot(self): """Test prepare_prompt with chat template format and few-shot examples.""" ...
"2"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager_class.py
test_init_default_values
assert
none_literal
15
from unittest.mock import Mock import pytest from lighteval.tasks.prompt_manager import PromptManager from lighteval.tasks.requests import Doc class TestPromptManager: def test_init_default_values(self): """Test PromptManager initialization with default values.""" pm = PromptManager() as...
None
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager_class.py
test_init_with_chat_template
assert
bool_literal
16
from unittest.mock import Mock import pytest from lighteval.tasks.prompt_manager import PromptManager from lighteval.tasks.requests import Doc class TestPromptManager: def test_init_with_chat_template(self): """Test PromptManager initialization with chat template enabled.""" tokenizer = Mock() ...
True
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager_class.py
test_init_default_values
assert
bool_literal
14
from unittest.mock import Mock import pytest from lighteval.tasks.prompt_manager import PromptManager from lighteval.tasks.requests import Doc class TestPromptManager: def test_init_default_values(self): """Test PromptManager initialization with default values.""" pm = PromptManager() a...
False
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_prompt_manager_class.py
test_prepare_prompt_chat_template_with_system_prompt
assert
string_literal
30
from unittest.mock import Mock import pytest from lighteval.tasks.prompt_manager import PromptManager from lighteval.tasks.requests import Doc class TestPromptManager: def test_prepare_prompt_chat_template_with_system_prompt(self): """Test prepare_prompt with chat template format and system prompt.""" ...
"user"
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_base_metrics.py
test_exact_match
assert
numeric_literal
26
import numpy as np import pytest from lighteval.metrics.dynamic_metrics import ( loglikelihood_acc_metric, multilingual_quasi_exact_match_metric, multilingual_quasi_f1_score_metric, normalized_multi_choice_prob_metric, probability_metric, ) from lighteval.metrics.metrics_sample import ExactMatches ...
1
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_base_metrics.py
test_exact_match
assert
numeric_literal
38
import numpy as np import pytest from lighteval.metrics.dynamic_metrics import ( loglikelihood_acc_metric, multilingual_quasi_exact_match_metric, multilingual_quasi_f1_score_metric, normalized_multi_choice_prob_metric, probability_metric, ) from lighteval.metrics.metrics_sample import ExactMatches ...
0
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_harness_metrics.py
test_model_prediction
assert
none_literal
81
import json import os import pytest from lighteval.metrics import apply_metric from lighteval.metrics.metrics import Metrics from lighteval.metrics.sample_preparator import ( GenerativeCorpusMetricInput, LogprobCorpusMetricInput, PerplexityCorpusMetricInput, ) from lighteval.models.model_output import Mod...
None
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_harness_metrics.py
test_model_prediction
pytest.approx
complex_expr
105
import json import os import pytest from lighteval.metrics import apply_metric from lighteval.metrics.metrics import Metrics from lighteval.metrics.sample_preparator import ( GenerativeCorpusMetricInput, LogprobCorpusMetricInput, PerplexityCorpusMetricInput, ) from lighteval.models.model_output import Mod...
ref, rel=1e-8)
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_harness_metrics.py
test_model_prediction
pytest.approx
complex_expr
112
import json import os import pytest from lighteval.metrics import apply_metric from lighteval.metrics.metrics import Metrics from lighteval.metrics.sample_preparator import ( GenerativeCorpusMetricInput, LogprobCorpusMetricInput, PerplexityCorpusMetricInput, ) from lighteval.models.model_output import Mod...
cur_ref_list, rel=1e-8)
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_harness_metrics.py
test_model_prediction
assert
func_call
105
import json import os import pytest from lighteval.metrics import apply_metric from lighteval.metrics.metrics import Metrics from lighteval.metrics.sample_preparator import ( GenerativeCorpusMetricInput, LogprobCorpusMetricInput, PerplexityCorpusMetricInput, ) from lighteval.models.model_output import Mod...
pytest.approx(ref, rel=1e-8)
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_harness_metrics.py
test_model_prediction
assert
func_call
112
import json import os import pytest from lighteval.metrics import apply_metric from lighteval.metrics.metrics import Metrics from lighteval.metrics.sample_preparator import ( GenerativeCorpusMetricInput, LogprobCorpusMetricInput, PerplexityCorpusMetricInput, ) from lighteval.models.model_output import Mod...
pytest.approx(cur_ref_list, rel=1e-8)
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_harness_prompts.py
test_model_prediction
assert
variable
51
import json import os import pytest import lighteval.tasks.default_prompts as default_prompts from lighteval.tasks.requests import Doc PATH_TO_HARNESS_PROMPTS = os.path.join(os.path.dirname(__file__), "reference_scores/harness_prompts.json") def pytest_generate_tests(metafunc: pytest.Metafunc): """Initializes t...
reference_line
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_reorder.py
test_reorder_dataset
assert
variable
60
from lighteval.data import GenerativeTaskDataset from lighteval.metrics.utils.metric_utils import SamplingMethod from lighteval.tasks.requests import Doc TEST_DATA = [ Doc( query="1 The quick brown fox jumps over the lazy dog", choices=["A", "B", "C"], gold_index=0, ), Doc( ...
orignal
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_reorder.py
test_reorder_dataset
assert
func_call
55
from lighteval.data import GenerativeTaskDataset from lighteval.metrics.utils.metric_utils import SamplingMethod from lighteval.tasks.requests import Doc TEST_DATA = [ Doc( query="1 The quick brown fox jumps over the lazy dog", choices=["A", "B", "C"], gold_index=0, ), Doc( ...
len(original_data)
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/test_unit_reorder.py
test_reorder_dataset
assert
func_call
51
from lighteval.data import GenerativeTaskDataset from lighteval.metrics.utils.metric_utils import SamplingMethod from lighteval.tasks.requests import Doc TEST_DATA = [ Doc( query="1 The quick brown fox jumps over the lazy dog", choices=["A", "B", "C"], gold_index=0, ), Doc( ...
len(sorted_data[i + 1].query)
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
test_cache_directory_structure
self.assertEqual
numeric_literal
77
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
2)
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
test_cache_directory_structure
self.assertIn
func_call
80
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
str(folder))
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
test_cache_directory_structure
self.assertTrue
func_call
79
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
folder.exists())
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
_test_cache
self.assertEqual
collection
62
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
{self.task_name})
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
_test_cache
self.assertEqual
func_call
72
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
asdict(response))
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
_test_cache
self.assertTrue
func_call
52
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
cache_file.exists())
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
test_cache_decorator_presence
self.assertTrue
func_call
77
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
hasattr(method, "__wrapped__"))
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
test_cache_decorator_presence
self.assertTrue
func_call
72
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
hasattr(model_class, method_name))
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
_test_cache
self.assertEqual
collection
55
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
{self.task_name: [doc.id for doc in self.docs]})
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_caching.py
_test_cache
self.assertEqual
string_literal
63
import tempfile import unittest from dataclasses import asdict from unittest.mock import Mock, patch import pytest import torch from lighteval.models.abstract_model import LightevalModel from lighteval.models.model_output import ModelResponse from lighteval.tasks.requests import Doc from lighteval.utils.cache_managem...
f"{len(uncached_docs)} documents not found in cache when it should be 0")
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_utils.py
test_empty_text
self.assertEqual
string_literal
12
import unittest from lighteval.utils.utils import remove_reasoning_tags class TestRemoveReasoningTags(unittest.TestCase): def test_empty_text(self): text = "" tag_pairs = [("<think>", "</think>")] result = remove_reasoning_tags(text, tag_pairs) self.assertEqual(result,
"")
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_utils.py
test_remove_reasoning_tags
self.assertEqual
string_literal
11
import unittest from lighteval.utils.utils import remove_reasoning_tags class TestRemoveReasoningTags(unittest.TestCase): def test_remove_reasoning_tags(self): text = "<think> Reasoning section </think> Answer section" tag_pairs = [("<think>", "</think>")] result = remove_reasoning_tags(te...
" Answer section")
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_utils.py
test_remove_multiple_tags
self.assertEqual
string_literal
12
import unittest from lighteval.utils.utils import remove_reasoning_tags class TestRemoveReasoningTags(unittest.TestCase): def test_remove_multiple_tags(self): text = "<think> Reasoning </think> Interlude <think> More reasoning </think> Answer" tag_pairs = [("<think>", "</think>")] result ...
" Interlude Answer")
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_utils.py
test_no_tags
self.assertEqual
string_literal
12
import unittest from lighteval.utils.utils import remove_reasoning_tags class TestRemoveReasoningTags(unittest.TestCase): def test_no_tags(self): text = "No reasoning tags here." tag_pairs = [("<think>", "</think>")] result = remove_reasoning_tags(text, tag_pairs) self.assertEqua...
"No reasoning tags here.")
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_utils.py
test_no_opening_tag
self.assertEqual
string_literal
12
import unittest from lighteval.utils.utils import remove_reasoning_tags class TestRemoveReasoningTags(unittest.TestCase): def test_no_opening_tag(self): text = "No opening tag <think> Reasoning section. </think> Answer section" tag_pairs = [("<think>", "</think>")] result = remove_reasoni...
"No opening tag Answer section")
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
huggingface/lighteval
a88a5269de362dee96fd30b34d7b063705458b7b
66
train
train
tests/utils/test_utils.py
test_no_closing_tag
self.assertEqual
string_literal
12
import unittest from lighteval.utils.utils import remove_reasoning_tags class TestRemoveReasoningTags(unittest.TestCase): def test_no_closing_tag(self): text = "<think> Reasoning section. Answer section" tag_pairs = [("<think>", "</think>")] result = remove_reasoning_tags(text, tag_pairs)...
"<think> Reasoning section. Answer section")
a88a5269de362dee96fd30b34d7b063705458b7b
66
v2_extractor_at_anchor
hungpham2511/toppra
386881ea270237f11c5d43968628338ffe0050d5
43
train
train
tests/constraint/test_create_rave_torque.py
test_torque_bound_barret
assert
variable
21
import pytest import toppra import numpy as np def barret_robot(rave_env): rave_env.Reset() rave_env.Load("data/lab1.env.xml") robot = rave_env.GetRobots()[0] yield robot @pytest.mark.parametrize("dof", [3, 5, 7]) def test_torque_bound_barret(barret_robot, dof): barret_robot.SetActiveDOFs(range(do...
dof
386881ea270237f11c5d43968628338ffe0050d5
43
v2_extractor_at_anchor
hungpham2511/toppra
386881ea270237f11c5d43968628338ffe0050d5
43
train
train
tests/constraint/test_create_rave_torque.py
test_torque_bound_barret
assert
complex_expr
25
import pytest import toppra import numpy as np def barret_robot(rave_env): rave_env.Reset() rave_env.Load("data/lab1.env.xml") robot = rave_env.GetRobots()[0] yield robot @pytest.mark.parametrize("dof", [3, 5, 7]) def test_torque_bound_barret(barret_robot, dof): barret_robot.SetActiveDOFs(range(do...
2 * dof
386881ea270237f11c5d43968628338ffe0050d5
43
v2_extractor_at_anchor