eval-framework 0.6.4__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {eval_framework-0.6.4 → eval_framework-0.7.2}/PKG-INFO +7 -6
- {eval_framework-0.6.4 → eval_framework-0.7.2}/README.md +3 -1
- {eval_framework-0.6.4 → eval_framework-0.7.2}/pyproject.toml +9 -10
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/language_checker.py +6 -0
- eval_framework-0.7.2/src/eval_framework/tasks/__init__.py +6 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/base.py +18 -33
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/copa.py +3 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/csqa.py +6 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/drop.py +6 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/gpqa.py +3 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/humaneval.py +3 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/math_reasoning.py +9 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/mbpp.py +1 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/medqa.py +4 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/naturalqs_open.py +2 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/piqa.py +4 -5
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/sciq.py +2 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/social_iqa.py +2 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/squad.py +5 -3
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/winogrande.py +2 -0
- eval_framework-0.7.2/src/eval_framework/tasks/dataset_revisions.py +84 -0
- eval_framework-0.7.2/src/eval_framework/tasks/frozen-hf-dataset-revisions.json +3 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/hf-dataset-revisions.json +1 -2
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/registry.py +0 -20
- eval_framework-0.7.2/src/eval_framework/tasks/task_names.py +85 -0
- eval_framework-0.6.4/src/eval_framework/metrics/completion/bleu.py +0 -76
- eval_framework-0.6.4/src/eval_framework/metrics/completion/chrf.py +0 -62
- eval_framework-0.6.4/src/eval_framework/metrics/completion/ter.py +0 -67
- eval_framework-0.6.4/src/eval_framework/tasks/__init__.py +0 -12
- eval_framework-0.6.4/src/eval_framework/tasks/dataset_revisions.py +0 -145
- eval_framework-0.6.4/src/eval_framework/tasks/task-dataset-revisions.json +0 -66
- eval_framework-0.6.4/src/eval_framework/tasks/task_names.py +0 -284
- {eval_framework-0.6.4 → eval_framework-0.7.2}/LICENSE +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/base_config.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/context/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/context/determined.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/context/eval.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/context/local.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/evaluation_generator.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/exceptions.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/external/drop_process_results.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/external/ifeval_impl/README.md +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/external/ifeval_impl/instructions.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/external/ifeval_impl/instructions_registry.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/external/ifeval_impl/instructions_util.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/external/ifeval_impl/utils.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/llm/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/llm/aleph_alpha.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/llm/base.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/llm/huggingface.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/llm/mistral.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/llm/models.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/llm/openai.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/llm/vllm.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/llm/vllm_local_server.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/logger.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/main.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/aggregators/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/aggregators/aggregators.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/base.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/accuracy_completion.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/code_assertion.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/code_execution_pass_at_one.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/concordance_index.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/csv_format.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/drop_completion.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/exponential_similarity.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/f1.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/format_checker.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/grid_difference.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/ifeval.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/json_format.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/length_control.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/math_minerva_completion.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/math_reasoning_completion.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/minerva_math_utils.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/multipl_e_assertion.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/placeholder_checker.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/repetition.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/rouge_1.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/rouge_2.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/rouge_geometric_mean.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/rouge_l.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/completion/text_counter.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/efficiency/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/efficiency/bytes_per_sequence_position.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/base.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/chatbot_style_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/coherence_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/comparison_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/conciseness_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/contains_names_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/format_correctness_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/instruction_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/language.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/long_context_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/models.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/refusal_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/sql_quality_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/graders/summary_world_knowledge_grader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_chatbot_style.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_coherence.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_completion_accuracy.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_conciseness.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_contains_names.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_format_correctness.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_instruction.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_mtbench_pair.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_mtbench_single.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_refusal.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_sql.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/llm_judge_world_knowledge.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/llm/utils.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/loglikelihood/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/loglikelihood/accuracy_loglikelihood.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/loglikelihood/base.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/loglikelihood/bits_per_byte.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/loglikelihood/confidence_weighted_accuracy.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/loglikelihood/dcs.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/loglikelihood/probability_mass.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/metrics/loglikelihood/ternary.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/py.typed +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/response_generator.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/result_processors/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/result_processors/base.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/result_processors/hf_uploader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/result_processors/result_processor.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/result_processors/wandb_uploader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/run.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/run_direct.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/shared/types.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/suite.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/Dockerfile_codebench +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/arc.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/arc_de.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/bigcodebench.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/global_mmlu.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/goldenswag.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/gsm8k.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/hellaswag.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/ifeval.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/mmlu.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/mmlu_pro.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/multipl_e.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/triviaqa.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/eval_config.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/perturbation.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/task_loader.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/task_style.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/utils.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/utils/constants.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/utils/file_ops.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/utils/generate_task_docs.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/utils/helpers.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/utils/logging.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/utils/packaging.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/utils/tqdm_handler.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/template_formatting/README.md +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/template_formatting/__init__.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/template_formatting/formatter.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/template_formatting/mistral_formatter.py +0 -0
- {eval_framework-0.6.4 → eval_framework-0.7.2}/src/template_formatting/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: eval-framework
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Evaluation Framework
|
|
5
5
|
Author: Aleph Alpha Research
|
|
6
6
|
License: Apache License
|
|
@@ -215,7 +215,6 @@ Requires-Dist: pyyaml>=6.0.3,<7
|
|
|
215
215
|
Requires-Dist: xmltodict>=1.0.4,<1.1
|
|
216
216
|
Requires-Dist: pydantic>=2.13.4,<3
|
|
217
217
|
Requires-Dist: datasets>=5.0.0,<6
|
|
218
|
-
Requires-Dist: sacrebleu>=2.6.0,<3
|
|
219
218
|
Requires-Dist: pycountry>=26.2.16,<27
|
|
220
219
|
Requires-Dist: nltk>=3.10.0,<4
|
|
221
220
|
Requires-Dist: python-dotenv>=1.2.2,<2
|
|
@@ -231,7 +230,7 @@ Requires-Dist: llm-sandbox[docker]==0.3.39
|
|
|
231
230
|
Requires-Dist: jsonlines>=4,<5
|
|
232
231
|
Requires-Dist: lxml>=6.1.1,<7
|
|
233
232
|
Requires-Dist: python-iso639>=2026.4.20
|
|
234
|
-
Requires-Dist: wandb>=0.28.
|
|
233
|
+
Requires-Dist: wandb>=0.28.1,<1
|
|
235
234
|
Requires-Dist: boto3>=1.43.19,<2
|
|
236
235
|
Requires-Dist: numpy>=2.2.6
|
|
237
236
|
Requires-Dist: antlr4-python3-runtime==4.11.0
|
|
@@ -241,10 +240,10 @@ Requires-Dist: eval-framework[determined,api,openai,transformers,accelerate,vllm
|
|
|
241
240
|
Requires-Dist: aleph-alpha-client>=11.5.1 ; extra == 'api'
|
|
242
241
|
Requires-Dist: determined>=0.38.1,<0.39 ; extra == 'determined'
|
|
243
242
|
Requires-Dist: tensorboard==2.21.0 ; extra == 'determined'
|
|
244
|
-
Requires-Dist: mistral-common>=1.11.
|
|
243
|
+
Requires-Dist: mistral-common>=1.11.6,<2 ; extra == 'mistral'
|
|
245
244
|
Requires-Dist: huggingface-hub>=0.36.2,<0.37 ; extra == 'mistral'
|
|
246
245
|
Requires-Dist: eval-framework[vllm] ; extra == 'mistral'
|
|
247
|
-
Requires-Dist: openai>=
|
|
246
|
+
Requires-Dist: openai>=2.46.0,<3 ; extra == 'openai'
|
|
248
247
|
Requires-Dist: tiktoken>=0.13.0,<1 ; extra == 'openai'
|
|
249
248
|
Requires-Dist: transformers>=4.45.2,<5 ; extra == 'openai'
|
|
250
249
|
Requires-Dist: transformers>=4.45.2,<5 ; extra == 'optional'
|
|
@@ -523,8 +522,10 @@ If you use `eval-framework` in your research, please cite:
|
|
|
523
522
|
|
|
524
523
|
```bibtex
|
|
525
524
|
@software{eval_framework,
|
|
525
|
+
author={Aleph Alpha Research},
|
|
526
526
|
title={Aleph Alpha Eval Framework},
|
|
527
|
-
year={
|
|
527
|
+
year={2026},
|
|
528
|
+
version = {x.y.z},
|
|
528
529
|
url={https://github.com/Aleph-Alpha-Research/eval-framework}
|
|
529
530
|
}
|
|
530
531
|
```
|
|
@@ -254,8 +254,10 @@ If you use `eval-framework` in your research, please cite:
|
|
|
254
254
|
|
|
255
255
|
```bibtex
|
|
256
256
|
@software{eval_framework,
|
|
257
|
+
author={Aleph Alpha Research},
|
|
257
258
|
title={Aleph Alpha Eval Framework},
|
|
258
|
-
year={
|
|
259
|
+
year={2026},
|
|
260
|
+
version = {x.y.z},
|
|
259
261
|
url={https://github.com/Aleph-Alpha-Research/eval-framework}
|
|
260
262
|
}
|
|
261
263
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "eval-framework"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.7.2"
|
|
4
4
|
description = "Evaluation Framework"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -22,7 +22,6 @@ dependencies = [
|
|
|
22
22
|
"xmltodict>=1.0.4,<1.1",
|
|
23
23
|
"pydantic>=2.13.4,<3",
|
|
24
24
|
"datasets>=5.0.0,<6",
|
|
25
|
-
"sacrebleu>=2.6.0,<3",
|
|
26
25
|
"pycountry>=26.2.16,<27",
|
|
27
26
|
"nltk>=3.10.0,<4",
|
|
28
27
|
"python-dotenv>=1.2.2,<2",
|
|
@@ -38,7 +37,7 @@ dependencies = [
|
|
|
38
37
|
"jsonlines>=4,<5",
|
|
39
38
|
"lxml>=6.1.1,<7",
|
|
40
39
|
"python-iso639>=2026.4.20",
|
|
41
|
-
"wandb>=0.28.
|
|
40
|
+
"wandb>=0.28.1,<1",
|
|
42
41
|
"boto3>=1.43.19,<2",
|
|
43
42
|
"numpy>=2.2.6",
|
|
44
43
|
# is a dependency of sympy, but not explicitly listed in the requirements.txt
|
|
@@ -55,7 +54,7 @@ determined = [
|
|
|
55
54
|
]
|
|
56
55
|
api = ["aleph-alpha-client>=11.5.1"]
|
|
57
56
|
openai = [
|
|
58
|
-
"openai>=
|
|
57
|
+
"openai>=2.46.0,<3",
|
|
59
58
|
"tiktoken>=0.13.0,<1",
|
|
60
59
|
"transformers>=4.45.2,<5",
|
|
61
60
|
]
|
|
@@ -70,7 +69,7 @@ vllm = [
|
|
|
70
69
|
"torch>=2.5,<3"
|
|
71
70
|
]
|
|
72
71
|
mistral = [
|
|
73
|
-
"mistral-common>=1.11.
|
|
72
|
+
"mistral-common>=1.11.6,<2",
|
|
74
73
|
"huggingface-hub>=0.36.2,<0.37",
|
|
75
74
|
"eval_framework[vllm]",
|
|
76
75
|
]
|
|
@@ -91,16 +90,16 @@ eval_framework = "eval_framework.run:run"
|
|
|
91
90
|
|
|
92
91
|
[dependency-groups]
|
|
93
92
|
dev = [
|
|
94
|
-
"mypy>=2.
|
|
93
|
+
"mypy>=2.3.0,<3",
|
|
95
94
|
"pytest>=9.1.1,<10",
|
|
96
95
|
"pytest-mock>=3.15.1",
|
|
97
96
|
"pytest-xdist>=3.8.0,<4",
|
|
98
97
|
"pytest-sugar>1.1,<2",
|
|
99
98
|
"types-pyyaml>=6.0.12.20260518,<7",
|
|
100
|
-
"types-python-dateutil>=2.9.0.
|
|
101
|
-
"types-requests>=2.33.0.
|
|
99
|
+
"types-python-dateutil>=2.9.0.20260716,<3",
|
|
100
|
+
"types-requests>=2.33.0.20260712,<3",
|
|
102
101
|
"plotly>=6.8.0,<7",
|
|
103
|
-
"ruff>=0.15.
|
|
102
|
+
"ruff>=0.15.22",
|
|
104
103
|
"pip-licenses>=5.5.5",
|
|
105
104
|
]
|
|
106
105
|
flash-attn = [
|
|
@@ -109,7 +108,7 @@ flash-attn = [
|
|
|
109
108
|
]
|
|
110
109
|
|
|
111
110
|
[build-system]
|
|
112
|
-
requires = ["uv_build>=0.11.
|
|
111
|
+
requires = ["uv_build>=0.11.29,<0.11.30"]
|
|
113
112
|
build-backend = "uv_build"
|
|
114
113
|
|
|
115
114
|
[tool.uv.build-backend]
|
|
@@ -41,6 +41,9 @@ class LanguageConsistencyChecker(BaseMetric[Completion]):
|
|
|
41
41
|
if response.error is not None:
|
|
42
42
|
return [MetricResult(metric_name=self.NAME, value=None, higher_is_better=True, error=response.error)]
|
|
43
43
|
|
|
44
|
+
if not response.completion:
|
|
45
|
+
return [] # No completion means no language to detect, so it is excluded from aggregation
|
|
46
|
+
|
|
44
47
|
completion_language = response.get_completion_language()
|
|
45
48
|
target_language = response.get_instruction_language()
|
|
46
49
|
if completion_language == target_language == "":
|
|
@@ -57,6 +60,9 @@ class LanguageRawConsistencyChecker(BaseMetric[Completion]):
|
|
|
57
60
|
if response.error is not None:
|
|
58
61
|
return [MetricResult(metric_name=self.NAME, value=None, higher_is_better=True, error=response.error)]
|
|
59
62
|
|
|
63
|
+
if not response.raw_completion:
|
|
64
|
+
return [] # No completion means no language to detect, so it is excluded from aggregation
|
|
65
|
+
|
|
60
66
|
raw_completion_language = response.get_raw_completion_language()
|
|
61
67
|
target_language = response.get_instruction_language()
|
|
62
68
|
|
|
@@ -10,12 +10,10 @@ from typing import TYPE_CHECKING, Any, Self, TypeVar
|
|
|
10
10
|
|
|
11
11
|
import iso639
|
|
12
12
|
from datasets import DatasetDict, DownloadConfig, load_dataset
|
|
13
|
-
from huggingface_hub import HfApi
|
|
14
|
-
from huggingface_hub.errors import RevisionNotFoundError
|
|
15
13
|
from pydantic import BaseModel, ConfigDict
|
|
16
14
|
|
|
17
15
|
from eval_framework.shared.types import BaseMetricContext, Completion, Error, RawCompletion
|
|
18
|
-
from eval_framework.tasks.dataset_revisions import
|
|
16
|
+
from eval_framework.tasks.dataset_revisions import pinned_revision
|
|
19
17
|
from eval_framework.tasks.utils import classproperty, raise_errors
|
|
20
18
|
from template_formatting.formatter import Message, Role
|
|
21
19
|
|
|
@@ -93,7 +91,6 @@ class BaseTask[SubjectType](ABC):
|
|
|
93
91
|
SAMPLE_SPLIT: str
|
|
94
92
|
FEWSHOT_SPLIT: str
|
|
95
93
|
SUBJECTS: list[SubjectType]
|
|
96
|
-
HF_REVISION: str | None = None # tag name, or branch name, or commit hash to ensure reproducibility
|
|
97
94
|
|
|
98
95
|
# The lock file this task resolves its pinned dataset revision from, keyed by ``DATASET_PATH``.
|
|
99
96
|
# Each task sets this explicitly: point it at a lock file (e.g. ``HF_REVISIONS_LOCKFILE`` or a
|
|
@@ -118,15 +115,18 @@ class BaseTask[SubjectType](ABC):
|
|
|
118
115
|
self.user_prompt_suffix: str | None = None
|
|
119
116
|
self.stop_sequences: list[str] | None = None
|
|
120
117
|
self.max_tokens: int | None = None
|
|
121
|
-
self._apply_hf_revision()
|
|
118
|
+
self.hf_revision: str | None = self._apply_hf_revision()
|
|
122
119
|
|
|
123
|
-
def _apply_hf_revision(self, custom_hf_revision: str | None = None) -> None:
|
|
124
|
-
# Precedence: CLI/config override >
|
|
125
|
-
#
|
|
120
|
+
def _apply_hf_revision(self, custom_hf_revision: str | None = None) -> str | None:
|
|
121
|
+
# Precedence: CLI/config override > REVISION_LOCKFILE pin.
|
|
122
|
+
# Tasks without a Hugging Face dataset set REVISION_LOCKFILE to None and are not pinned.
|
|
126
123
|
if custom_hf_revision:
|
|
127
|
-
|
|
128
|
-
elif self.
|
|
129
|
-
self.
|
|
124
|
+
hf_revision = custom_hf_revision
|
|
125
|
+
elif self.REVISION_LOCKFILE is not None:
|
|
126
|
+
hf_revision = pinned_revision(self.REVISION_LOCKFILE, self.DATASET_PATH)
|
|
127
|
+
else:
|
|
128
|
+
hf_revision = None
|
|
129
|
+
return hf_revision
|
|
130
130
|
|
|
131
131
|
@classmethod
|
|
132
132
|
def with_overwrite(
|
|
@@ -148,7 +148,7 @@ class BaseTask[SubjectType](ABC):
|
|
|
148
148
|
logger.info(f"Setting SUBJECTS to `{filtered_subjects}` for the task {instance.__class__.__name__}")
|
|
149
149
|
instance.SUBJECTS = filtered_subjects # type: ignore[assignment]
|
|
150
150
|
|
|
151
|
-
instance._apply_hf_revision(custom_hf_revision)
|
|
151
|
+
instance.hf_revision = instance._apply_hf_revision(custom_hf_revision)
|
|
152
152
|
|
|
153
153
|
return instance
|
|
154
154
|
|
|
@@ -187,29 +187,14 @@ class BaseTask[SubjectType](ABC):
|
|
|
187
187
|
return custom_subjects # type: ignore[return-value]
|
|
188
188
|
|
|
189
189
|
def _load_hf_dataset(self, **kwargs: Any) -> Any:
|
|
190
|
-
# Check if the HF_REVISION is valid before loading the dataset
|
|
191
|
-
if self.HF_REVISION:
|
|
192
|
-
try:
|
|
193
|
-
_ = HfApi().dataset_info(repo_id=kwargs["path"], revision=self.HF_REVISION, timeout=100.0)
|
|
194
|
-
except Exception as e:
|
|
195
|
-
if isinstance(e, RevisionNotFoundError):
|
|
196
|
-
raise e
|
|
197
|
-
|
|
198
190
|
cache_dir: str = os.environ.get("HF_DATASET_CACHE_DIR", f"{Path.home()}/.cache/huggingface/datasets")
|
|
199
191
|
download_config = DownloadConfig(cache_dir=cache_dir, max_retries=5)
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
)
|
|
207
|
-
except Exception:
|
|
208
|
-
return load_dataset(
|
|
209
|
-
**kwargs,
|
|
210
|
-
revision=self.HF_REVISION,
|
|
211
|
-
cache_dir=f"{Path.home()}/.cache/eval-framework",
|
|
212
|
-
)
|
|
192
|
+
return load_dataset(
|
|
193
|
+
**kwargs,
|
|
194
|
+
revision=self.hf_revision,
|
|
195
|
+
cache_dir=cache_dir,
|
|
196
|
+
download_config=download_config,
|
|
197
|
+
)
|
|
213
198
|
|
|
214
199
|
def _shuffle_splits(self, hf_dataset: DatasetDict) -> dict[str, Any]:
|
|
215
200
|
dataset = {}
|
|
@@ -17,6 +17,8 @@ class COPAEvalHarness(BaseTask[str]):
|
|
|
17
17
|
This version uses samples from the validation split as evaluation examples (same as lm-eval-harness).
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
21
|
+
|
|
20
22
|
NAME = "COPAEvalHarness"
|
|
21
23
|
DATASET_PATH = "aps/super_glue"
|
|
22
24
|
SAMPLE_SPLIT = "validation" # 100 examples (same split as lm-eval)
|
|
@@ -88,6 +90,7 @@ class COPA(COPAEvalHarness):
|
|
|
88
90
|
|
|
89
91
|
|
|
90
92
|
class COPA_IDKEvalHarness(COPAEvalHarness):
|
|
93
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
91
94
|
NAME = "COPA_IDKEvalHarness"
|
|
92
95
|
METRICS = [
|
|
93
96
|
AccuracyLoglikelihood,
|
|
@@ -13,6 +13,8 @@ from eval_framework.tasks.utils import get_n_letters
|
|
|
13
13
|
class CommonsenseQACloze(BaseTask[str]):
|
|
14
14
|
"""CommonsenseQA dataset: https://huggingface.co/datasets/tau/commonsense_qa"""
|
|
15
15
|
|
|
16
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
17
|
+
|
|
16
18
|
NAME = "CommonsenseQACloze"
|
|
17
19
|
DATASET_PATH = "tau/commonsense_qa"
|
|
18
20
|
SAMPLE_SPLIT = "validation"
|
|
@@ -53,6 +55,8 @@ class CommonsenseQAFullTextCloze(CommonsenseQACloze):
|
|
|
53
55
|
Scores loglikelihood over the full correct choice text; includes bits-per-byte.
|
|
54
56
|
"""
|
|
55
57
|
|
|
58
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
59
|
+
|
|
56
60
|
NAME = "CommonsenseQAFullTextCloze"
|
|
57
61
|
METRICS = [AccuracyLoglikelihood, AccuracyNormLoglikelihood, BitsPerByteLoglikelihood]
|
|
58
62
|
|
|
@@ -65,6 +69,8 @@ class CommonsenseQAFullTextCloze(CommonsenseQACloze):
|
|
|
65
69
|
class CommonsenseQAMC(CommonsenseQACloze):
|
|
66
70
|
"""Multiple-choice variant of CommonsenseQA where the model selects a letter (A-E)."""
|
|
67
71
|
|
|
72
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
73
|
+
|
|
68
74
|
NAME = "CommonsenseQAMC"
|
|
69
75
|
|
|
70
76
|
def _get_instruction_text(self, item: dict[str, Any]) -> str:
|
|
@@ -75,6 +75,8 @@ class DropCompletion(BaseTask[str]):
|
|
|
75
75
|
Uses DROP F1 and exact match. Stop at new paragraph or repeated prefixes.
|
|
76
76
|
"""
|
|
77
77
|
|
|
78
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
79
|
+
|
|
78
80
|
NAME = "DropCompletion"
|
|
79
81
|
DATASET_PATH = "EleutherAI/drop"
|
|
80
82
|
SAMPLE_SPLIT = "validation"
|
|
@@ -163,6 +165,8 @@ class DropCompletion_OLMES(DropCompletion):
|
|
|
163
165
|
class DropMC(BaseTask[str]):
|
|
164
166
|
"""Multiple-choice variant using allenai/drop-gen2mc (passage_original, question_original, choices, answerKey)."""
|
|
165
167
|
|
|
168
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
169
|
+
|
|
166
170
|
NAME = "DropMC"
|
|
167
171
|
DATASET_PATH = "allenai/drop-gen2mc"
|
|
168
172
|
SAMPLE_SPLIT = "validation"
|
|
@@ -233,6 +237,8 @@ class DropCloze(BaseTask[str]):
|
|
|
233
237
|
Includes BitsPerByte on the correct choice.
|
|
234
238
|
"""
|
|
235
239
|
|
|
240
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
241
|
+
|
|
236
242
|
NAME = "DropCloze"
|
|
237
243
|
DATASET_PATH = "allenai/drop-gen2mc"
|
|
238
244
|
SAMPLE_SPLIT = "validation"
|
|
@@ -22,6 +22,8 @@ logger = logging.getLogger(__name__)
|
|
|
22
22
|
class GPQA(BaseTask[str]):
|
|
23
23
|
"""GPQA dataset: https://huggingface.co/datasets/Idavidrein/gpqa"""
|
|
24
24
|
|
|
25
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
26
|
+
|
|
25
27
|
NAME = "GPQA"
|
|
26
28
|
DATASET_PATH = "Idavidrein/gpqa"
|
|
27
29
|
SAMPLE_SPLIT = "train"
|
|
@@ -172,6 +174,7 @@ class GPQA_IDK(GPQA):
|
|
|
172
174
|
|
|
173
175
|
|
|
174
176
|
class GPQA_COT(GPQA):
|
|
177
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
175
178
|
NAME = "GPQA_COT"
|
|
176
179
|
RESPONSE_TYPE = ResponseType.COMPLETION
|
|
177
180
|
METRICS = [AccuracyCompletion]
|
{eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/humaneval.py
RENAMED
|
@@ -28,6 +28,8 @@ class HumanEvalMetricContext(BaseMetricContext):
|
|
|
28
28
|
class HumanEval(BaseTask[str]):
|
|
29
29
|
"""HumanEval dataset: https://huggingface.co/datasets/openai/openai_humaneval/"""
|
|
30
30
|
|
|
31
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
32
|
+
|
|
31
33
|
NAME = "Human Eval"
|
|
32
34
|
DATASET_PATH = "openai/openai_humaneval"
|
|
33
35
|
SAMPLE_SPLIT = "test"
|
|
@@ -128,6 +130,7 @@ class HumanEval_OLMES(HumanEval):
|
|
|
128
130
|
|
|
129
131
|
class HumanEvalInstruct(HumanEval):
|
|
130
132
|
# See https://github.com/EleutherAI/lm-evaluation-harness/blob/main/lm_eval/tasks/humaneval/humaneval_instruct.yaml
|
|
133
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
131
134
|
NAME = "Human Eval Instruct"
|
|
132
135
|
CUE_PREFIX = "Here is the completed function:\n```python\n"
|
|
133
136
|
|
{eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/math_reasoning.py
RENAMED
|
@@ -482,6 +482,8 @@ class MATH500(MATHReasoning):
|
|
|
482
482
|
class MATH(MATHReasoning):
|
|
483
483
|
"""MATH dataset: https://huggingface.co/datasets/EleutherAI/hendrycks_math"""
|
|
484
484
|
|
|
485
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
486
|
+
|
|
485
487
|
NAME = "Math"
|
|
486
488
|
DATASET_PATH = "EleutherAI/hendrycks_math"
|
|
487
489
|
SAMPLE_SPLIT = "test"
|
|
@@ -559,6 +561,8 @@ class MATHMinervaEvalHarness(MATHReasoning):
|
|
|
559
561
|
Metrics: Exact Match, Exact Match (Flex) via MathMinervaCompletion.
|
|
560
562
|
"""
|
|
561
563
|
|
|
564
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
565
|
+
|
|
562
566
|
NAME = "MATHMinervaEvalHarness"
|
|
563
567
|
DATASET_PATH = "EleutherAI/hendrycks_math"
|
|
564
568
|
SAMPLE_SPLIT = "test"
|
|
@@ -595,6 +599,8 @@ class MATHMinerva(MATHMinervaEvalHarness):
|
|
|
595
599
|
"(The )Final Answer: The (final )answer is ...( I hope it is correct.)", where parentheses are optional.
|
|
596
600
|
"""
|
|
597
601
|
|
|
602
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
603
|
+
|
|
598
604
|
NAME = "MATHMinerva"
|
|
599
605
|
METRICS = [MathMinervaCompletionRelaxed]
|
|
600
606
|
|
|
@@ -610,6 +616,8 @@ class MATH500Minerva(MATHMinerva):
|
|
|
610
616
|
Uses HuggingFaceH4/MATH-500 which has a single 'default' config (no subject splits).
|
|
611
617
|
"""
|
|
612
618
|
|
|
619
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
620
|
+
|
|
613
621
|
NAME = "MATH500Minerva"
|
|
614
622
|
DATASET_PATH = "HuggingFaceH4/MATH-500"
|
|
615
623
|
SAMPLE_SPLIT = "test"
|
|
@@ -622,6 +630,7 @@ class MATH500Minerva(MATHMinerva):
|
|
|
622
630
|
|
|
623
631
|
|
|
624
632
|
class MATHLvl5(MATH):
|
|
633
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
625
634
|
NAME = "Math Lvl 5"
|
|
626
635
|
|
|
627
636
|
def _load_dataset(self, subject: SubjectType) -> None:
|
|
@@ -17,6 +17,8 @@ from eval_framework.tasks.utils import get_n_letters
|
|
|
17
17
|
class MedQACloze(BaseTask[str]):
|
|
18
18
|
"""MedQA cloze (loglikelihood over choice text)."""
|
|
19
19
|
|
|
20
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
21
|
+
|
|
20
22
|
NAME = "MedQACloze"
|
|
21
23
|
DATASET_PATH = "davidheineman/medqa-en"
|
|
22
24
|
SAMPLE_SPLIT = "test"
|
|
@@ -53,6 +55,8 @@ class MedQACloze(BaseTask[str]):
|
|
|
53
55
|
class MedQAMC(MedQACloze):
|
|
54
56
|
"""MedQA multiple choice (loglikelihood over A/B/C/D/...)."""
|
|
55
57
|
|
|
58
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
59
|
+
|
|
56
60
|
NAME = "MedQAMC"
|
|
57
61
|
|
|
58
62
|
def __init__(self, num_fewshot: int = 0) -> None:
|
{eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/naturalqs_open.py
RENAMED
|
@@ -82,11 +82,13 @@ class _NaturalQsOpenChoice_Base(BaseTask[str]):
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
class NaturalQsOpenCloze(_NaturalQsOpenChoice_Base):
|
|
85
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
85
86
|
NAME = "NaturalQsOpenCloze"
|
|
86
87
|
TASK_STYLER = ClozeStyle()
|
|
87
88
|
|
|
88
89
|
|
|
89
90
|
class NaturalQsOpenMC(_NaturalQsOpenChoice_Base):
|
|
91
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
90
92
|
NAME = "NaturalQsOpenMC"
|
|
91
93
|
TASK_STYLER = MCStyle()
|
|
92
94
|
|
|
@@ -9,18 +9,17 @@ from eval_framework.metrics.loglikelihood.confidence_weighted_accuracy import Co
|
|
|
9
9
|
from eval_framework.metrics.loglikelihood.dcs import DistributionalCorrectnessScore
|
|
10
10
|
from eval_framework.metrics.loglikelihood.ternary import TernaryScore
|
|
11
11
|
from eval_framework.tasks.base import NO_SUBJECT, BaseTask, Language, ResponseType
|
|
12
|
-
from eval_framework.tasks.dataset_revisions import
|
|
12
|
+
from eval_framework.tasks.dataset_revisions import FROZEN_HF_REVISIONS_LOCKFILE
|
|
13
13
|
from eval_framework.tasks.utils import get_n_letters
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class PIQA(BaseTask[str]):
|
|
17
17
|
"""PIQA dataset: https://huggingface.co/datasets/ybisk/piqa"""
|
|
18
18
|
|
|
19
|
-
REVISION_LOCKFILE =
|
|
19
|
+
REVISION_LOCKFILE = FROZEN_HF_REVISIONS_LOCKFILE
|
|
20
20
|
|
|
21
21
|
NAME = "PIQA"
|
|
22
22
|
DATASET_PATH = "ybisk/piqa"
|
|
23
|
-
HF_REVISION = "6b3aceb3276e5ab7e51895d73151a718690af38c"
|
|
24
23
|
SAMPLE_SPLIT = "validation" # 1838 examples (same split as lm-eval)
|
|
25
24
|
FEWSHOT_SPLIT = "test" # 3084 examples
|
|
26
25
|
RESPONSE_TYPE = ResponseType.LOGLIKELIHOODS
|
|
@@ -54,7 +53,7 @@ class PIQA_OLMES(PIQA):
|
|
|
54
53
|
loglikelihood over " A"/" B".
|
|
55
54
|
"""
|
|
56
55
|
|
|
57
|
-
REVISION_LOCKFILE =
|
|
56
|
+
REVISION_LOCKFILE = FROZEN_HF_REVISIONS_LOCKFILE
|
|
58
57
|
|
|
59
58
|
NAME = "PIQA_OLMES"
|
|
60
59
|
SAMPLE_SPLIT = "train" # Use train split (largest) to best match OLMES, which evaluates all splits
|
|
@@ -79,7 +78,7 @@ class PIQA_OLMES(PIQA):
|
|
|
79
78
|
|
|
80
79
|
|
|
81
80
|
class PIQA_IDK(PIQA):
|
|
82
|
-
REVISION_LOCKFILE =
|
|
81
|
+
REVISION_LOCKFILE = FROZEN_HF_REVISIONS_LOCKFILE
|
|
83
82
|
NAME = "PIQA_IDK"
|
|
84
83
|
METRICS = [
|
|
85
84
|
AccuracyLoglikelihood,
|
|
@@ -95,6 +95,7 @@ class SCIQ_OLMES(SCIQ):
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
class SCIQ_IDK(SCIQ):
|
|
98
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
98
99
|
NAME = "SciQ_IDK"
|
|
99
100
|
METRICS = [
|
|
100
101
|
AccuracyLoglikelihood,
|
|
@@ -137,6 +138,7 @@ class SCIQEvalHarness(SCIQ):
|
|
|
137
138
|
|
|
138
139
|
|
|
139
140
|
class SCIQEvalHarness_IDK(SCIQEvalHarness):
|
|
141
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
140
142
|
NAME = "SciQ Eval Harness_IDK"
|
|
141
143
|
METRICS = [
|
|
142
144
|
AccuracyLoglikelihood,
|
{eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/benchmarks/social_iqa.py
RENAMED
|
@@ -151,6 +151,8 @@ class SocialIQACloze(BaseTask[str]):
|
|
|
151
151
|
Social IQA cloze: loglikelihood over full answer text.
|
|
152
152
|
"""
|
|
153
153
|
|
|
154
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
155
|
+
|
|
154
156
|
NAME = "SocialIQACloze"
|
|
155
157
|
DATASET_PATH = SOCIAL_I_QA_DATASET_PATH
|
|
156
158
|
SAMPLE_SPLIT = "validation"
|
|
@@ -63,9 +63,9 @@ class SQUAD2(BaseTask[str]):
|
|
|
63
63
|
|
|
64
64
|
def _validate_hf_revision(self, dataset_path: str) -> None:
|
|
65
65
|
"""Validate HuggingFace revision if specified."""
|
|
66
|
-
if self.
|
|
66
|
+
if self.hf_revision:
|
|
67
67
|
try:
|
|
68
|
-
HfApi().dataset_info(repo_id=dataset_path, revision=self.
|
|
68
|
+
HfApi().dataset_info(repo_id=dataset_path, revision=self.hf_revision, timeout=100.0)
|
|
69
69
|
except RevisionNotFoundError:
|
|
70
70
|
raise
|
|
71
71
|
|
|
@@ -76,7 +76,7 @@ class SQUAD2(BaseTask[str]):
|
|
|
76
76
|
|
|
77
77
|
return load_dataset(
|
|
78
78
|
**kwargs,
|
|
79
|
-
revision=self.
|
|
79
|
+
revision=self.hf_revision,
|
|
80
80
|
cache_dir=cache_dir,
|
|
81
81
|
download_config=download_config,
|
|
82
82
|
)
|
|
@@ -192,6 +192,8 @@ class SQUAD2BPB(SQUAD2):
|
|
|
192
192
|
Reports bits-per-byte on the reference answer (first acceptable answer).
|
|
193
193
|
"""
|
|
194
194
|
|
|
195
|
+
REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
|
|
196
|
+
|
|
195
197
|
NAME = "SQuAD2 BPB"
|
|
196
198
|
RESPONSE_TYPE = ResponseType.LOGLIKELIHOODS
|
|
197
199
|
METRICS = [BitsPerByteLoglikelihood]
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""Pinned Hugging Face dataset revisions.
|
|
2
|
+
|
|
3
|
+
A lock file maps dataset paths to pinned commit SHAs. Tasks declare the lock file that
|
|
4
|
+
governs them via their ``REVISION_LOCKFILE`` attribute and resolve their pin from it at
|
|
5
|
+
construction time.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import json
|
|
9
|
+
import logging
|
|
10
|
+
from functools import lru_cache
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
from huggingface_hub import HfApi
|
|
14
|
+
|
|
15
|
+
logger = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
# The revision of the datasets used by the benchmarks is declared in a file, so we can automatically
|
|
18
|
+
# update them in CI without having to parse python code.
|
|
19
|
+
HF_REVISIONS_LOCKFILE = Path(__file__).resolve().parent / "hf-dataset-revisions.json"
|
|
20
|
+
|
|
21
|
+
# Hand-maintained pins for datasets that must not move, e.g. because newer revisions are
|
|
22
|
+
# incompatible with the task implementation. Never updated by the refresh job.
|
|
23
|
+
FROZEN_HF_REVISIONS_LOCKFILE = Path(__file__).resolve().parent / "frozen-hf-dataset-revisions.json"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class HfDatasetRevisions:
|
|
27
|
+
"""Pinned revisions of Hugging Face datasets, mapping dataset path → commit SHA."""
|
|
28
|
+
|
|
29
|
+
def __init__(self, revisions: dict[str, str]) -> None:
|
|
30
|
+
self._revisions = dict(revisions)
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_file(cls, path: Path) -> "HfDatasetRevisions":
|
|
34
|
+
return cls(json.loads(path.read_text(encoding="utf-8")))
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, str]:
|
|
37
|
+
return dict(self._revisions)
|
|
38
|
+
|
|
39
|
+
def to_file(self, path: Path) -> None:
|
|
40
|
+
path.write_text(
|
|
41
|
+
json.dumps(dict(sorted(self._revisions.items())), indent=4, ensure_ascii=False) + "\n",
|
|
42
|
+
encoding="utf-8",
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def revision_for(self, dataset_path: str) -> str:
|
|
46
|
+
"""The pinned commit SHA for a dataset. Raises ``KeyError`` if it is not pinned."""
|
|
47
|
+
return self._revisions[dataset_path]
|
|
48
|
+
|
|
49
|
+
def num_revisions(self) -> int:
|
|
50
|
+
return len(self._revisions)
|
|
51
|
+
|
|
52
|
+
def update_to_latest(self, api: HfApi) -> None:
|
|
53
|
+
"""Update every pin to its dataset's latest commit SHA.
|
|
54
|
+
|
|
55
|
+
Intended to run on CI to ensure the pinned revisions are up-to-date. If the lookup for a
|
|
56
|
+
dataset fails, its existing pin is kept.
|
|
57
|
+
"""
|
|
58
|
+
for path, sha in self._revisions.items():
|
|
59
|
+
try:
|
|
60
|
+
latest = api.dataset_info(path, timeout=100.0).sha
|
|
61
|
+
except Exception as exc:
|
|
62
|
+
logger.warning("Could not refresh %s (%s); keeping pinned revision %s", path, exc, sha)
|
|
63
|
+
continue
|
|
64
|
+
if latest and latest != sha:
|
|
65
|
+
logger.info("%s: %s -> %s", path, sha, latest)
|
|
66
|
+
self._revisions[path] = latest or sha
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@lru_cache
|
|
70
|
+
def _revisions_from_file(lockfile: Path) -> HfDatasetRevisions:
|
|
71
|
+
return HfDatasetRevisions.from_file(lockfile)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def pinned_revision(lockfile: Path, dataset_path: str) -> str:
|
|
75
|
+
"""The commit SHA pinned for ``dataset_path`` in ``lockfile``.
|
|
76
|
+
|
|
77
|
+
Resolves the exact dataset revision an eval runs against, so results stay reproducible
|
|
78
|
+
across dataset updates. Every dataset used by a task is expected to be pinned; a missing
|
|
79
|
+
entry is a bug in the lock file and raises ``KeyError``.
|
|
80
|
+
"""
|
|
81
|
+
try:
|
|
82
|
+
return _revisions_from_file(lockfile).revision_for(dataset_path)
|
|
83
|
+
except KeyError:
|
|
84
|
+
raise KeyError(f"Dataset '{dataset_path}' is not pinned in {lockfile}") from None
|
{eval_framework-0.6.4 → eval_framework-0.7.2}/src/eval_framework/tasks/hf-dataset-revisions.json
RENAMED
|
@@ -31,6 +31,5 @@
|
|
|
31
31
|
"openai/openai_humaneval": "7dce6050a7d6d172f3cc5c32aa97f52fa1a2e544",
|
|
32
32
|
"rajpurkar/squad": "7b6d24c440a36b6815f21b70d25016731768db1f",
|
|
33
33
|
"rajpurkar/squad_v2": "3ffb306f725f7d2ce8394bc1873b24868140c412",
|
|
34
|
-
"tau/commonsense_qa": "94630fe30dad47192a8546eb75f094926d47e155"
|
|
35
|
-
"ybisk/piqa": "2e8ac2dffd59bac8c3c6714948f4c551a0848bb0"
|
|
34
|
+
"tau/commonsense_qa": "94630fe30dad47192a8546eb75f094926d47e155"
|
|
36
35
|
}
|