Skip to content

Commit

Permalink
formatting files
Browse files Browse the repository at this point in the history
  • Loading branch information
thallysonjsa committed Dec 4, 2024
1 parent 8cf8e1e commit 6708894
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/helm/benchmark/run_specs/enem_challenge_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from helm.benchmark.run_spec import RunSpec, run_spec_function
from helm.benchmark.scenarios.scenario import ScenarioSpec


@run_spec_function("enem_challenge")
def get_enem_spec() -> RunSpec:
scenario_spec = ScenarioSpec(
Expand Down
6 changes: 3 additions & 3 deletions src/helm/benchmark/scenarios/enem_challenge_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@

class ENEMChallengeScenario(Scenario):
"""
The Exame Nacional do Ensino Médio (ENEM) is an advanced High-School level exam widely applied
The Exame Nacional do Ensino Médio (ENEM) is an advanced High-School level exam widely applied
every year by the Brazilian government to students that wish to undertake a University degree.
The questions are about all types of intelectual fields and they are divided into four groups
The questions are about all types of intelectual fields and they are divided into four groups
that are named as: Humanities, Languages, Sciences and Mathematics.
This scenario is based on the exams that were applied throughout the years of 2009 and 2023.
The dataset can be found in this link: https://huggingface.co/datasets/eduagarcia/enem_challenge
"""

name = "enem_challenge"
description = "ENEM Challenge dataset"
tags = ["knowledge", "multiple_choice", "pt-br"]
Expand Down
41 changes: 34 additions & 7 deletions src/helm/benchmark/scenarios/test_enem_challenge_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,41 @@ def test_enem_challenge_scenario():
assert len(instances) == 1431
assert instances[0].split == TEST_SPLIT

assert instances[0].input.text.startswith("A atmosfera terrestre é composta pelos gases nitrogênio (N2) e oxigênio (O2)")
assert instances[0].input.text.startswith(
"A atmosfera terrestre é composta pelos gases nitrogênio (N2) e oxigênio (O2)"
)
assert len(instances[0].input.text) == 1163

assert instances[0].references == [
Reference(output=Output(text="reduzir o calor irradiado pela Terra mediante a substituição da produção primária pela industrialização refrigerada. "), tags=[]),
Reference(output=Output(text="promover a queima da biomassa vegetal, responsável pelo aumento do efeito estufa devido à produção de CH4. "), tags=[]),
Reference(output=Output(text="reduzir o desmatamento, mantendo-se, assim, o potencial da vegetação em absorver o CO2 da atmosfera. "), tags=[CORRECT_TAG]),
Reference(output=Output(text="aumentar a concentração atmosférica de H2O, molécula capaz de absorver grande quantidade de calor. "), tags=[]),
Reference(output=Output(text="remover moléculas orgânicas polares da atmosfera, diminuindo a capacidade delas de reter calor. "), tags=[]),
Reference(
output=Output(
text="reduzir o calor irradiado pela Terra mediante a substituição da produção primária pela industrialização refrigerada. "
),
tags=[],
),
Reference(
output=Output(
text="promover a queima da biomassa vegetal, responsável pelo aumento do efeito estufa devido à produção de CH4. "
),
tags=[],
),
Reference(
output=Output(
text="reduzir o desmatamento, mantendo-se, assim, o potencial da vegetação em absorver o CO2 da atmosfera. "
),
tags=[CORRECT_TAG],
),
Reference(
output=Output(
text="aumentar a concentração atmosférica de H2O, molécula capaz de absorver grande quantidade de calor. "
),
tags=[],
),
Reference(
output=Output(
text="remover moléculas orgânicas polares da atmosfera, diminuindo a capacidade delas de reter calor. "
),
tags=[],
),
]
assert instances[0].references[2].is_correct == True
assert instances[0].references[2].is_correct == True

0 comments on commit 6708894

Please sign in to comment.