eval-framework 0.9.2__tar.gz → 0.10.0__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.
Files changed (170) hide show
  1. {eval_framework-0.9.2 → eval_framework-0.10.0}/PKG-INFO +5 -4
  2. {eval_framework-0.9.2 → eval_framework-0.10.0}/pyproject.toml +18 -7
  3. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/context/determined.py +12 -17
  4. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/context/eval.py +0 -15
  5. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/context/local.py +0 -1
  6. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/response_generator.py +7 -18
  7. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/run.py +6 -46
  8. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/run_direct.py +0 -3
  9. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/base.py +56 -58
  10. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/arc.py +0 -1
  11. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/arc_de.py +0 -1
  12. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/arc_ellamind.py +72 -0
  13. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/copa.py +0 -1
  14. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/csqa.py +0 -1
  15. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/csqa_ellamind.py +95 -0
  16. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/drop.py +0 -3
  17. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/global_mmlu.py +0 -1
  18. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/gpqa.py +0 -4
  19. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/gpqa_ellamind.py +114 -0
  20. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/gsm8k.py +0 -1
  21. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/gsm8k_ellamind.py +87 -0
  22. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/hellaswag_ellamind.py +73 -0
  23. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/hendrycks_math_ellamind.py +119 -0
  24. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/hle_ellamind.py +101 -0
  25. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/humaneval_ellamind.py +65 -0
  26. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/math_reasoning.py +0 -1
  27. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/mbpp_ellamind.py +172 -0
  28. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/medqa.py +0 -1
  29. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/mmlu.py +0 -5
  30. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/mmlu_pro.py +0 -4
  31. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/naturalqs_open.py +0 -2
  32. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/piqa.py +0 -1
  33. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/piqa_ellamind.py +95 -0
  34. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/sciq.py +0 -2
  35. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/simpleqa_ellamind.py +94 -0
  36. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/siqa_ellamind.py +92 -0
  37. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/social_iqa.py +0 -1
  38. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/squad.py +0 -2
  39. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/winogrande.py +0 -1
  40. eval_framework-0.10.0/src/eval_framework/tasks/benchmarks/winogrande_ellamind.py +140 -0
  41. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/eval_config.py +0 -2
  42. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/hf-dataset-revisions.json +13 -0
  43. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/registry.py +12 -48
  44. eval_framework-0.10.0/src/eval_framework/tasks/task_loader.py +89 -0
  45. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/task_names.py +144 -0
  46. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/task_style.py +0 -1
  47. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/utils.py +1 -209
  48. eval_framework-0.9.2/src/eval_framework/tasks/perturbation.py +0 -83
  49. eval_framework-0.9.2/src/eval_framework/tasks/task_loader.py +0 -81
  50. {eval_framework-0.9.2 → eval_framework-0.10.0}/LICENSE +0 -0
  51. {eval_framework-0.9.2 → eval_framework-0.10.0}/README.md +0 -0
  52. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/__init__.py +0 -0
  53. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/base_config.py +0 -0
  54. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/context/__init__.py +0 -0
  55. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/evaluation_generator.py +0 -0
  56. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/exceptions.py +0 -0
  57. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/external/drop_process_results.py +0 -0
  58. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/external/ifeval_impl/README.md +0 -0
  59. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/external/ifeval_impl/instructions.py +0 -0
  60. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/external/ifeval_impl/instructions_registry.py +0 -0
  61. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/external/ifeval_impl/instructions_util.py +0 -0
  62. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/external/ifeval_impl/utils.py +0 -0
  63. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/llm/__init__.py +0 -0
  64. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/llm/aleph_alpha.py +0 -0
  65. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/llm/base.py +0 -0
  66. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/llm/huggingface.py +0 -0
  67. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/llm/models.py +0 -0
  68. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/llm/openai.py +0 -0
  69. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/logger.py +0 -0
  70. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/main.py +0 -0
  71. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/__init__.py +0 -0
  72. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/aggregators/__init__.py +0 -0
  73. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/aggregators/aggregators.py +0 -0
  74. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/base.py +0 -0
  75. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/__init__.py +0 -0
  76. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/accuracy_completion.py +0 -0
  77. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/code_assertion.py +0 -0
  78. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/code_execution_pass_at_one.py +0 -0
  79. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/concordance_index.py +0 -0
  80. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/csv_format.py +0 -0
  81. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/drop_completion.py +0 -0
  82. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/exponential_similarity.py +0 -0
  83. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/f1.py +0 -0
  84. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/format_checker.py +0 -0
  85. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/grid_difference.py +0 -0
  86. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/ifeval.py +0 -0
  87. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/json_format.py +0 -0
  88. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/language_checker.py +0 -0
  89. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/length_control.py +0 -0
  90. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/math_minerva_completion.py +0 -0
  91. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/math_reasoning_completion.py +0 -0
  92. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/minerva_math_utils.py +0 -0
  93. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/multipl_e_assertion.py +0 -0
  94. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/placeholder_checker.py +0 -0
  95. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/repetition.py +0 -0
  96. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/rouge_1.py +0 -0
  97. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/rouge_2.py +0 -0
  98. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/rouge_geometric_mean.py +0 -0
  99. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/rouge_l.py +0 -0
  100. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/completion/text_counter.py +0 -0
  101. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/efficiency/__init__.py +0 -0
  102. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/efficiency/bytes_per_sequence_position.py +0 -0
  103. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/__init__.py +0 -0
  104. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/base.py +0 -0
  105. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/chatbot_style_grader.py +0 -0
  106. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/coherence_grader.py +0 -0
  107. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/comparison_grader.py +0 -0
  108. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/conciseness_grader.py +0 -0
  109. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/contains_names_grader.py +0 -0
  110. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/format_correctness_grader.py +0 -0
  111. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/instruction_grader.py +0 -0
  112. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/language.py +0 -0
  113. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/long_context_grader.py +0 -0
  114. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/models.py +0 -0
  115. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/refusal_grader.py +0 -0
  116. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/sql_quality_grader.py +0 -0
  117. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/graders/summary_world_knowledge_grader.py +0 -0
  118. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_chatbot_style.py +0 -0
  119. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_coherence.py +0 -0
  120. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_completion_accuracy.py +0 -0
  121. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_conciseness.py +0 -0
  122. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_contains_names.py +0 -0
  123. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_format_correctness.py +0 -0
  124. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_instruction.py +0 -0
  125. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_mtbench_pair.py +0 -0
  126. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_mtbench_single.py +0 -0
  127. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_refusal.py +0 -0
  128. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_sql.py +0 -0
  129. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/llm_judge_world_knowledge.py +0 -0
  130. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/llm/utils.py +0 -0
  131. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/loglikelihood/__init__.py +0 -0
  132. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/loglikelihood/accuracy_loglikelihood.py +0 -0
  133. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/loglikelihood/base.py +0 -0
  134. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/loglikelihood/bits_per_byte.py +0 -0
  135. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/loglikelihood/confidence_weighted_accuracy.py +0 -0
  136. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/loglikelihood/dcs.py +0 -0
  137. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/loglikelihood/probability_mass.py +0 -0
  138. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/metrics/loglikelihood/ternary.py +0 -0
  139. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/py.typed +0 -0
  140. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/result_processors/__init__.py +0 -0
  141. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/result_processors/base.py +0 -0
  142. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/result_processors/hf_uploader.py +0 -0
  143. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/result_processors/result_processor.py +0 -0
  144. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/result_processors/wandb_uploader.py +0 -0
  145. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/shared/types.py +0 -0
  146. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/suite.py +0 -0
  147. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/Dockerfile_codebench +0 -0
  148. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/__init__.py +0 -0
  149. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/__init__.py +0 -0
  150. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/bigcodebench.py +0 -0
  151. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/goldenswag.py +0 -0
  152. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/hellaswag.py +0 -0
  153. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/humaneval.py +0 -0
  154. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/ifeval.py +0 -0
  155. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/mbpp.py +0 -0
  156. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/benchmarks/multipl_e.py +0 -0
  157. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/dataset_revisions.py +0 -0
  158. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/frozen-hf-dataset-revisions.json +0 -0
  159. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/tasks/markdown_doc.py +0 -0
  160. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/utils/constants.py +0 -0
  161. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/utils/file_ops.py +0 -0
  162. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/utils/helpers.py +0 -0
  163. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/utils/logging.py +0 -0
  164. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/utils/packaging.py +0 -0
  165. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/eval_framework/utils/tqdm_handler.py +0 -0
  166. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/template_formatting/README.md +0 -0
  167. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/template_formatting/__init__.py +0 -0
  168. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/template_formatting/formatter.py +0 -0
  169. {eval_framework-0.9.2 → eval_framework-0.10.0}/src/template_formatting/mistral_formatter.py +0 -0
  170. {eval_framework-0.9.2 → eval_framework-0.10.0}/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.9.2
3
+ Version: 0.10.0
4
4
  Summary: Evaluation Framework
5
5
  Author: Aleph Alpha Research
6
6
  License: Apache License
@@ -208,6 +208,8 @@ Classifier: Operating System :: OS Independent
208
208
  Classifier: License :: OSI Approved :: Apache Software License
209
209
  Classifier: Programming Language :: Python
210
210
  Classifier: Programming Language :: Python :: 3.12
211
+ Classifier: Programming Language :: Python :: 3.13
212
+ Classifier: Programming Language :: Python :: 3.14
211
213
  Classifier: Programming Language :: Python :: 3 :: Only
212
214
  Classifier: Topic :: Software Development :: Libraries
213
215
  Classifier: Typing :: Typed
@@ -221,7 +223,6 @@ Requires-Dist: python-dotenv>=1.2.2,<2
221
223
  Requires-Dist: lingua-language-detector>=2.2.0,<3
222
224
  Requires-Dist: google-crc32c>=1.8.0,<2
223
225
  Requires-Dist: langdetect>=1.0.9,<2
224
- Requires-Dist: spacy>=3.8.14,<4
225
226
  Requires-Dist: jsonschema>=4.26.0,<5
226
227
  Requires-Dist: mysql-connector-python>=26.7.0,<27
227
228
  Requires-Dist: psycopg2-binary>=2.9.12,<3
@@ -232,7 +233,7 @@ Requires-Dist: lxml>=6.1.1,<7
232
233
  Requires-Dist: python-iso639>=2026.7.23
233
234
  Requires-Dist: wandb>=0.28.1,<1
234
235
  Requires-Dist: boto3>=1.43.19,<2
235
- Requires-Dist: numpy>=2.5.1
236
+ Requires-Dist: numpy>=2.5.2
236
237
  Requires-Dist: antlr4-python3-runtime==4.11.0
237
238
  Requires-Dist: scipy>=1.18.0,<2
238
239
  Requires-Dist: accelerate ; extra == 'accelerate'
@@ -248,7 +249,7 @@ Requires-Dist: jinja2>=3.1.6,<4 ; extra == 'optional'
248
249
  Requires-Dist: transformers>=4.45.2,<5 ; extra == 'transformers'
249
250
  Requires-Dist: torch>=2.13.0,<3 ; extra == 'transformers'
250
251
  Requires-Dist: accelerate>=1.14.0,<2 ; extra == 'transformers'
251
- Requires-Python: >=3.12, <3.13
252
+ Requires-Python: >=3.12, <3.15
252
253
  Project-URL: repository, https://github.com/Aleph-Alpha-Research/eval-framework
253
254
  Provides-Extra: accelerate
254
255
  Provides-Extra: all
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "eval-framework"
3
- version = "0.9.2"
3
+ version = "0.10.0"
4
4
  description = "Evaluation Framework"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
7
- requires-python = ">=3.12,<3.13"
7
+ requires-python = ">=3.12,<3.15"
8
8
  authors = [
9
9
  { name = "Aleph Alpha Research" }
10
10
  ]
@@ -13,6 +13,8 @@ classifiers = [
13
13
  "License :: OSI Approved :: Apache Software License",
14
14
  "Programming Language :: Python",
15
15
  "Programming Language :: Python :: 3.12",
16
+ "Programming Language :: Python :: 3.13",
17
+ "Programming Language :: Python :: 3.14",
16
18
  "Programming Language :: Python :: 3 :: Only",
17
19
  "Topic :: Software Development :: Libraries",
18
20
  "Typing :: Typed",
@@ -28,7 +30,6 @@ dependencies = [
28
30
  "lingua-language-detector>=2.2.0,<3",
29
31
  "google-crc32c>=1.8.0,<2",
30
32
  "langdetect>=1.0.9,<2", # required by the original ifeval implementation
31
- "spacy>=3.8.14,<4",
32
33
  "jsonschema>=4.26.0,<5",
33
34
  "mysql-connector-python>=26.7.0,<27", # required for sql-related tasks
34
35
  "psycopg2-binary>=2.9.12,<3", # required for sql-related tasks
@@ -39,7 +40,7 @@ dependencies = [
39
40
  "python-iso639>=2026.7.23",
40
41
  "wandb>=0.28.1,<1",
41
42
  "boto3>=1.43.19,<2",
42
- "numpy>=2.5.1",
43
+ "numpy>=2.5.2",
43
44
  # is a dependency of sympy, but not explicitly listed in the requirements.txt
44
45
  # https://github.com/sympy/sympy/blob/0204fa34e8f6f6f8ccb4de01209be9a2345c9d6e/doc/src/contributing/dependencies.md?plain=1#L125
45
46
  "antlr4-python3-runtime==4.11.0",
@@ -89,10 +90,10 @@ dev = [
89
90
  "pytest-xdist>=3.8.0,<4",
90
91
  "pytest-sugar>1.1,<2",
91
92
  "types-pyyaml>=6.0.12.20260724,<7",
92
- "types-python-dateutil>=2.9.0.20260716,<3",
93
+ "types-python-dateutil>=2.9.0.20260807,<3",
93
94
  "types-requests>=2.33.0.20260712,<3",
94
95
  "plotly>=6.9.0,<7",
95
- "ruff>=0.16.1",
96
+ "ruff>=0.16.2",
96
97
  "pip-licenses>=5.5.5",
97
98
  ]
98
99
  flash-attn = [
@@ -137,6 +138,16 @@ known-third-party = ["wandb"]
137
138
 
138
139
  [tool.ruff.lint.extend-per-file-ignores]
139
140
  "__init__.py" = ["F401"]
141
+ # Prompt strings are too long for:
142
+ "tests/tests_eval_framework/tasks/benchmarks/test_csqa_ellamind.py" = ["E501"]
143
+ "tests/tests_eval_framework/tasks/benchmarks/test_gpqa_ellamind.py" = ["E501"]
144
+ "tests/tests_eval_framework/tasks/benchmarks/test_gsm8k_ellamind.py" = ["E501"]
145
+ "tests/tests_eval_framework/tasks/benchmarks/test_hendrycks_math_ellamind.py" = ["E501"]
146
+ "tests/tests_eval_framework/tasks/benchmarks/test_hle_ellamind.py" = ["E501"]
147
+ "tests/tests_eval_framework/tasks/benchmarks/test_mbpp_ellamind.py" = ["E501"]
148
+ "tests/tests_eval_framework/tasks/benchmarks/test_piqa_ellamind.py" = ["E501"]
149
+ "tests/tests_eval_framework/tasks/benchmarks/test_siqa_ellamind.py" = ["E501"]
150
+ "tests/tests_eval_framework/tasks/benchmarks/test_winogrande_ellamind.py" = ["E501"]
140
151
 
141
152
  [tool.mypy]
142
153
  plugins = "pydantic.mypy"
@@ -147,7 +158,7 @@ files = ["src", "utils"]
147
158
  [tool.pytest.ini_options]
148
159
  testpaths = ["./tests"]
149
160
  minversion = 8.0
150
- addopts = "-p 'no:legacypath' --doctest-modules"
161
+ addopts = "-p 'no:legacypath' --doctest-modules -n auto"
151
162
  markers = [
152
163
  "gpu: needs a GPU runner, otherwise test can not be run",
153
164
  "cpu_slow: runs for a long time (on CPU)",
@@ -12,7 +12,6 @@ from eval_framework.context.eval import EvalContext
12
12
  from eval_framework.context.local import _load_model
13
13
  from eval_framework.llm.base import BaseLLM
14
14
  from eval_framework.tasks.eval_config import EvalConfig
15
- from eval_framework.tasks.perturbation import PerturbationConfig
16
15
  from eval_framework.tasks.registry import validate_task_name
17
16
  from eval_framework.tasks.task_loader import load_extra_tasks
18
17
 
@@ -31,7 +30,6 @@ class TaskArgs(BaseModel):
31
30
  task_subjects: list[str] | None = None
32
31
  hf_revision: str | None = None
33
32
  user_prompt_suffix: str | None = None
34
- perturbation_config: PerturbationConfig | None = None
35
33
  repeats: int | None = None
36
34
 
37
35
 
@@ -48,7 +46,7 @@ class Hyperparameters(BaseModel):
48
46
  description: str | None = None
49
47
  task_args: TaskArgs
50
48
  llm_args: dict[str, Any] | None = {}
51
- extra_task_modules: list[str] | None = None
49
+ extra_tasks_dir: str | None = None
52
50
  delete_output_dir_after_upload: bool | None = None
53
51
 
54
52
 
@@ -67,19 +65,18 @@ class DeterminedContext(EvalContext):
67
65
  raise RuntimeError("Failed to retrieve cluster info.")
68
66
 
69
67
  # Load extra tasks if specified first
70
- extra_task_modules = info.trial.hparams.get("extra_task_modules", None)
71
- if extra_task_modules:
72
- name = "extra_task_modules"
68
+ extra_tasks_dir = info.trial.hparams.get("extra_tasks_dir", None)
69
+ if extra_tasks_dir:
70
+ name = "extra_tasks_dir"
73
71
  val_cli = getattr(self, name, None)
74
- val_hparams = extra_task_modules
75
- if val_hparams:
76
- if val_cli and val_hparams and val_cli != val_hparams:
77
- logger.info(
78
- f"CLI argument {name} ({val_cli}) is being overridden by hyperparameters:"
79
- f"({val_hparams}). If it fails due to duplicate task names, remove the CLI argument and"
80
- "consolidate as a determined hyperparameter instead."
81
- )
82
- load_extra_tasks(val_hparams)
72
+ val_hparams = extra_tasks_dir
73
+ if val_cli and val_hparams and val_cli != val_hparams:
74
+ logger.info(
75
+ f"CLI argument {name} ({val_cli}) is being overridden by hyperparameters:"
76
+ f"({val_hparams}). If it fails due to duplicate task names, remove the CLI argument and"
77
+ "consolidate as a determined hyperparameter instead."
78
+ )
79
+ load_extra_tasks(val_hparams)
83
80
 
84
81
  self.hparams = Hyperparameters(**info.trial.hparams)
85
82
 
@@ -112,7 +109,6 @@ class DeterminedContext(EvalContext):
112
109
  "user_prompt_suffix",
113
110
  "judge_model_name",
114
111
  "judge_model_args",
115
- "perturbation_config",
116
112
  "repeats",
117
113
  ]:
118
114
  val_cli = getattr(self, name, None)
@@ -145,7 +141,6 @@ class DeterminedContext(EvalContext):
145
141
  task_subjects=self.hparams.task_args.task_subjects,
146
142
  hf_revision=self.hparams.task_args.hf_revision or self.hf_revision,
147
143
  user_prompt_suffix=user_prompt_suffix,
148
- perturbation_config=self.hparams.task_args.perturbation_config or self.perturbation_config,
149
144
  output_dir=self.hparams.output_dir,
150
145
  llm_judge_class=llm_judge_class,
151
146
  judge_model_args=self.hparams.task_args.judge_model_args or self.judge_model_args,
@@ -9,7 +9,6 @@ from typing import Any
9
9
  import eval_framework
10
10
  from eval_framework.llm.base import BaseLLM
11
11
  from eval_framework.tasks.eval_config import EvalConfig
12
- from eval_framework.tasks.perturbation import PerturbationConfig
13
12
 
14
13
 
15
14
  def import_models(models_file: PathLike | str) -> dict[str, type[BaseLLM]]:
@@ -72,9 +71,6 @@ class EvalContext(AbstractContextManager):
72
71
  judge_model_args: dict[str, Any] | None = None,
73
72
  batch_size: int | None = None,
74
73
  description: str | None = None,
75
- perturbation_type: str | None = None,
76
- perturbation_probability: float | None = None,
77
- perturbation_seed: int | None = None,
78
74
  randomize_judge_order: bool = False,
79
75
  delete_output_dir_after_upload: bool | None = None,
80
76
  repeats: int | None = None,
@@ -105,17 +101,6 @@ class EvalContext(AbstractContextManager):
105
101
  self.randomize_judge_order = randomize_judge_order
106
102
  self.delete_output_dir_after_upload = delete_output_dir_after_upload
107
103
  self.repeats = repeats
108
- if perturbation_type or perturbation_probability is not None:
109
- perturbation = {
110
- "type": perturbation_type,
111
- "probability": perturbation_probability,
112
- "seed": perturbation_seed,
113
- }
114
- self.perturbation_config: PerturbationConfig | None = PerturbationConfig(
115
- **{k: v for k, v in perturbation.items() if v is not None}
116
- )
117
- else:
118
- self.perturbation_config = None
119
104
 
120
105
  self.config: EvalConfig | None = None
121
106
 
@@ -48,7 +48,6 @@ class LocalContext(EvalContext):
48
48
  num_samples=self.num_samples,
49
49
  max_tokens=self.max_tokens,
50
50
  num_fewshot=self.num_fewshot,
51
- perturbation_config=self.perturbation_config,
52
51
  task_name=self.task_name,
53
52
  task_subjects=self.task_subjects,
54
53
  hf_revision=self.hf_revision,
@@ -60,23 +60,13 @@ class ResponseGenerator:
60
60
  self.num_samples = config.num_samples
61
61
  self.save_intermediate_results = config.save_intermediate_results
62
62
 
63
- if config.perturbation_config is not None:
64
- self.task = registry()[config.task_name].create_perturbation(
65
- config.perturbation_config,
66
- config.num_fewshot,
67
- config.task_subjects,
68
- config.hf_revision,
69
- user_prompt_suffix=config.user_prompt_suffix,
70
- seed=RANDOM_SEED,
71
- )
72
- else:
73
- self.task = registry()[config.task_name].create(
74
- config.num_fewshot,
75
- config.task_subjects,
76
- config.hf_revision,
77
- user_prompt_suffix=config.user_prompt_suffix,
78
- seed=RANDOM_SEED,
79
- )
63
+ self.task = registry()[config.task_name].create(
64
+ config.num_fewshot,
65
+ config.task_subjects,
66
+ config.hf_revision,
67
+ user_prompt_suffix=config.user_prompt_suffix,
68
+ seed=RANDOM_SEED,
69
+ )
80
70
 
81
71
  self.response_type = self.task.get_response_type()
82
72
 
@@ -341,7 +331,6 @@ class ResponseGenerator:
341
331
  "num_samples",
342
332
  "llm_name",
343
333
  "llm_args",
344
- "perturbation_config",
345
334
  "repeats",
346
335
  "user_prompt_suffix",
347
336
  ]
@@ -42,11 +42,11 @@ def parse_args() -> argparse.Namespace:
42
42
  help="The path to the Python module file containing model classes.",
43
43
  )
44
44
  parser.add_argument(
45
- "--extra-task-modules",
46
- nargs="*",
47
- default=[],
45
+ "--extra-tasks-dir",
46
+ type=Path,
47
+ default=None,
48
48
  required=False,
49
- help="List of files and folders containing additional task definitions.",
49
+ help="Directory containing additional task plugin modules to load.",
50
50
  )
51
51
  parser.add_argument(
52
52
  "--llm-name",
@@ -102,37 +102,6 @@ def parse_args() -> argparse.Namespace:
102
102
  help="Randomize the order of answers presented to the LLM judge to mitigate position bias.",
103
103
  )
104
104
 
105
- # Perturbation arguments
106
- parser.add_argument(
107
- "--perturbation-type",
108
- type=str,
109
- required=False,
110
- choices=[
111
- "editor",
112
- "permute",
113
- "replace",
114
- "delete",
115
- "uppercase",
116
- ],
117
- help=(
118
- "The type of perturbation to apply. Note that this may not make sense for some prompts, for example those "
119
- "containing math and code."
120
- ),
121
- )
122
- parser.add_argument(
123
- "--perturbation-probability",
124
- type=float,
125
- required=False,
126
- default=None,
127
- help="The probability of applying a perturbation to each word or character (between 0.0 and 1.0).",
128
- )
129
- parser.add_argument(
130
- "--perturbation-seed",
131
- type=int,
132
- required=False,
133
- default=42,
134
- help="Random seed controlling perturbations.",
135
- )
136
105
  parser.add_argument(
137
106
  "--task-subjects",
138
107
  type=str,
@@ -313,12 +282,6 @@ def parse_args() -> argparse.Namespace:
313
282
 
314
283
  args.judge_model_args = judge_model_args
315
284
 
316
- # if args.extra_task_modules:
317
- # # Convert the comma-separated string into a list
318
- # args.extra_task_modules = [file_or_dir.strip() for file_or_dir in args.extra_task_modules.split(",")]
319
- # else:
320
- # args.extra_task_modules = None
321
-
322
285
  if args.task_suite and args.task_name:
323
286
  parser.error("--task-suite and --task-name are mutually exclusive.")
324
287
 
@@ -336,8 +299,8 @@ def _run_single_task(kwargs: dict) -> None:
336
299
  now = datetime.datetime.now()
337
300
  logger.info(f"starting time: {now}")
338
301
 
339
- if kwargs.get("extra_task_modules"):
340
- load_extra_tasks(kwargs["extra_task_modules"])
302
+ if kwargs.get("extra_tasks_dir"):
303
+ load_extra_tasks(kwargs["extra_tasks_dir"])
341
304
 
342
305
  context_name = kwargs.pop("context")
343
306
 
@@ -366,9 +329,6 @@ def _run_single_task(kwargs: dict) -> None:
366
329
  judge_model_args=kwargs["judge_model_args"],
367
330
  batch_size=kwargs["batch_size"],
368
331
  description=kwargs["description"],
369
- perturbation_type=kwargs["perturbation_type"],
370
- perturbation_probability=kwargs["perturbation_probability"],
371
- perturbation_seed=kwargs["perturbation_seed"],
372
332
  randomize_judge_order=kwargs["randomize_judge_order"],
373
333
  delete_output_dir_after_upload=kwargs["delete_output_dir_after_upload"],
374
334
  # save_logs=kwargs["save_logs"],
@@ -32,9 +32,6 @@ if __name__ == "__main__":
32
32
  "hf_upload_dir": "",
33
33
  "description": "",
34
34
  "batch_size": 1,
35
- "perturbation_type": None,
36
- "perturbation_probability": None,
37
- "perturbation_seed": None,
38
35
  "save_logs": True,
39
36
  }
40
37
  run_with_kwargs(kwargs)
@@ -129,10 +129,6 @@ class BaseTask[SubjectType](Task):
129
129
  # inherited implicitly (a subclass in another package would otherwise resolve the wrong file).
130
130
  REVISION_LOCKFILE: Path | None
131
131
 
132
- # Words in _get_instruction_text() not to be perturbed. List of words is case insensitive. No special characters
133
- # or whitespace should be included.
134
- PERTURBATION_UNMODIFIABLE_WORDS: list[str] | None
135
-
136
132
  # The language (or languages) tested by the benchmark. Accepts a single string, a dictionary specifying
137
133
  # language by subtopic, or `None` (for tasks not specific to a single language).
138
134
  LANGUAGE: Language | dict[str, Language] | dict[str, tuple[Language, Language]] | None
@@ -176,65 +172,19 @@ class BaseTask[SubjectType](Task):
176
172
  instance.user_prompt_suffix = user_prompt_suffix
177
173
  instance.rnd = random.Random(seed)
178
174
  # If custom subjects were provided during initialization, they take precedence over the class-level SUBJECTS.
179
- filtered_subjects = instance._filter_task_subjects(custom_subjects=custom_subjects)
180
- if filtered_subjects:
181
- logger.info(f"Setting SUBJECTS to `{filtered_subjects}` for the task {instance.__class__.__name__}")
182
- instance.SUBJECTS = filtered_subjects # type: ignore[assignment]
175
+ if custom_subjects:
176
+ filtered_subjects = resolve_overwrite_subjects(
177
+ custom_subjects=custom_subjects,
178
+ accepted_subjects=instance.SUBJECTS,
179
+ task_name=instance.display_name(),
180
+ )
181
+ logger.info(f"Setting SUBJECTS to `{filtered_subjects}` for the task {instance.display_name()}")
182
+ instance.SUBJECTS = filtered_subjects
183
183
 
184
184
  instance.hf_revision = instance._apply_hf_revision(custom_hf_revision)
185
185
 
186
186
  return instance
187
187
 
188
- def _filter_task_subjects(self, custom_subjects: list[str] | None) -> list[str] | list[tuple] | None:
189
- """Process custom subjects passed from EvalConfig. Check and returns restricted task subjects if specified."""
190
- if not custom_subjects:
191
- return None
192
-
193
- assert hasattr(self, "SUBJECTS") and len(self.SUBJECTS) > 0
194
- if isinstance(self.SUBJECTS[0], tuple):
195
- # subjects are specified as comma-separated strings but tuple positions may each hold a
196
- # different type (e.g. tuple[str, int, str]). Infer the expected type per position from an
197
- # actual subject and cast each part back to it, so it compares equal to the real values
198
- # below instead of just their str() form. "*" is a wildcard sentinel and stays a string.
199
- num_items = len(self.SUBJECTS[0])
200
- position_types = [type(self.SUBJECTS[0][i]) for i in range(num_items)]
201
-
202
- def cast(raw: str, i: int) -> Any:
203
- raw = raw.strip()
204
- return raw if raw == "*" else position_types[i](raw)
205
-
206
- filters = []
207
- for custom_subject in custom_subjects:
208
- parts = custom_subject.split(",")
209
- assert len(parts) == num_items, (
210
- f"Subject '{custom_subject}' has {len(parts)} parts, expected {num_items} for "
211
- f"task {self.display_name()}"
212
- )
213
- filters.append(tuple(cast(part, i) for i, part in enumerate(parts)))
214
-
215
- # check if all parts of custom subjects exists (* is a wildcard)
216
- legal_values = [
217
- set([s[i] for s in self.SUBJECTS if isinstance(s, tuple)] + ["*"]) for i in range(num_items)
218
- ]
219
-
220
- for tpl in filters:
221
- for i, v in enumerate(tpl):
222
- assert v in legal_values[i], f"Subject part {v} not found in task {self.__class__.__name__}"
223
-
224
- # filter task subjects. * is a supported wildcard for a specific item in a tuple, e.g. "DE_DE, *"
225
- chosen_subjects: list[tuple] = []
226
- for subject in self.SUBJECTS:
227
- subject_tuple = subject if isinstance(subject, tuple) else tuple(str(subject).split(","))
228
- for filter in filters:
229
- if all(filter[i] == "*" or filter[i] == subject_tuple[i] for i in range(num_items)):
230
- chosen_subjects.append(subject_tuple)
231
- break
232
- return chosen_subjects
233
- else:
234
- for cs in custom_subjects:
235
- assert cs in self.SUBJECTS, f"Subject {cs} not found in task {self.__class__.__name__}"
236
- return custom_subjects
237
-
238
188
  def _load_hf_dataset(self, **kwargs: Any) -> Any:
239
189
  cache_dir: str = os.environ.get("HF_DATASET_CACHE_DIR", f"{Path.home()}/.cache/huggingface/datasets")
240
190
  download_config = DownloadConfig(cache_dir=cache_dir, max_retries=5)
@@ -549,3 +499,51 @@ class BaseTask[SubjectType](Task):
549
499
 
550
500
  def display_name(self) -> str:
551
501
  return self.NAME
502
+
503
+
504
+ def _subject_parts(subject: object) -> tuple[str, ...]:
505
+ """A subject as its stringified parts: tuple subjects keep their fields, scalars are a single part.
506
+
507
+ Comparing string forms means tuple fields of any type work (e.g. tuple[str, int, str]) without
508
+ having to parse the CLI token into each field's native type.
509
+ """
510
+ return tuple(str(field) for field in subject) if isinstance(subject, tuple) else (str(subject),)
511
+
512
+
513
+ def resolve_overwrite_subjects[SubjectType](
514
+ custom_subjects: list[str], accepted_subjects: list[SubjectType], task_name: str
515
+ ) -> list[SubjectType]:
516
+ """Restrict `accepted_subjects` to the ones requested via --task-subjects.
517
+
518
+ A subject matches a token when their parts agree position by position, where "*" matches any one
519
+ part -- so "DE_DE,*" selects every German subject and "*" selects every scalar subject.
520
+ """
521
+ if not accepted_subjects:
522
+ raise ValueError(f"Task {task_name} has no SUBJECTS defined")
523
+
524
+ filters = {token: tuple(part.strip() for part in token.split(",")) for token in custom_subjects}
525
+
526
+ # Select and validate in one pass. Every filter is tried against every subject (no early exit), so
527
+ # a filter still counts as used when its subjects were already selected by an earlier filter --
528
+ # e.g. "a,*" after "a,1" is valid, not unused.
529
+ chosen_subjects: list[SubjectType] = []
530
+ used_filters: set[str] = set()
531
+ for subject in accepted_subjects:
532
+ fields = _subject_parts(subject)
533
+ matching = [
534
+ token
535
+ for token, parts in filters.items()
536
+ if len(parts) == len(fields) and all(p in ("*", f) for p, f in zip(parts, fields))
537
+ ]
538
+ if matching:
539
+ chosen_subjects.append(subject)
540
+ used_filters.update(matching)
541
+
542
+ for token in custom_subjects:
543
+ if token not in used_filters:
544
+ raise ValueError(
545
+ f"Subject '{token}' not found in task {task_name}. Subjects are matched by their "
546
+ f"string form, so check number and enum formatting."
547
+ )
548
+
549
+ return chosen_subjects
@@ -25,7 +25,6 @@ class ARC(BaseTask[str]):
25
25
  RESPONSE_TYPE = ResponseType.LOGLIKELIHOODS
26
26
  METRICS = [AccuracyLoglikelihood, AccuracyNormLoglikelihood, BitsPerByteLoglikelihood]
27
27
  SUBJECTS = ["ARC-Easy", "ARC-Challenge"]
28
- PERTURBATION_UNMODIFIABLE_WORDS = ["Question"] + get_n_letters(5)
29
28
  LANGUAGE = Language.ENG
30
29
 
31
30
  def __init__(self, num_fewshot: int = 0) -> None:
@@ -22,7 +22,6 @@ class ARC_DE(BaseTask[str]):
22
22
  RESPONSE_TYPE = ResponseType.LOGLIKELIHOODS
23
23
  METRICS = [AccuracyLoglikelihood, AccuracyNormLoglikelihood, BitsPerByteLoglikelihood]
24
24
  SUBJECTS = [NO_SUBJECT]
25
- PERTURBATION_UNMODIFIABLE_WORDS = ["Frage"] + get_n_letters(5)
26
25
  LANGUAGE = Language.DEU
27
26
 
28
27
  def __init__(self, num_fewshot: int = 0) -> None:
@@ -0,0 +1,72 @@
1
+ """German ARC (EllaMind) tasks.
2
+
3
+ https://huggingface.co/datasets/ellamind/arc-multilingual
4
+ """
5
+
6
+ from typing import Any
7
+
8
+ from eval_framework.tasks.base import BaseTask, Language
9
+ from eval_framework.tasks.dataset_revisions import HF_REVISIONS_LOCKFILE
10
+ from eval_framework.tasks.task_style import BPBStyle, ClozeStyle, MCStyle, answer_key_to_index
11
+
12
+
13
+ class _ARC_ELLAMIND_DE_Base(BaseTask[str]):
14
+ """Non-registered base for all German ARC (EllaMind) variants.
15
+
16
+ Dataset: https://huggingface.co/datasets/ellamind/arc-multilingual
17
+
18
+ The HuggingFace config (``name``) is the language, so we always load the German
19
+ subset (``deu``). To mirror regular ARC behavior, we expose ARC subsets via
20
+ ``SUBJECTS`` (``ARC-Easy`` / ``ARC-Challenge``) and filter rows by the
21
+ ``arc_config`` column after loading.
22
+ """
23
+
24
+ DATASET_PATH = "ellamind/arc-multilingual"
25
+ SAMPLE_SPLIT = "test"
26
+ FEWSHOT_SPLIT = "test"
27
+ SUBJECTS = ["ARC-Easy", "ARC-Challenge"]
28
+ LANGUAGE = Language.DEU
29
+ _LANGUAGE_SUBSET = "deu"
30
+
31
+ def _load_dataset(self, subject: str) -> None:
32
+ # Subject encodes the ARC subset, while HF config encodes the language.
33
+ super()._load_dataset(self._LANGUAGE_SUBSET)
34
+ self.dataset = {
35
+ split: [item for item in items if item["arc_config"] == subject] for split, items in self.dataset.items()
36
+ }
37
+
38
+ def _get_raw_question(self, item: dict[str, Any]) -> str:
39
+ return item["question"]
40
+
41
+ def _get_choices(self, item: dict[str, Any]) -> list[str]:
42
+ return item["choices"]
43
+
44
+ def _get_correct_index(self, item: dict[str, Any]) -> int:
45
+ return answer_key_to_index(item["answer_key"])
46
+
47
+
48
+ class ARC_ELLAMIND_CLOZE_DE(_ARC_ELLAMIND_DE_Base):
49
+ """German ARC - Cloze format."""
50
+
51
+ REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
52
+
53
+ NAME = "ARC_ELLAMIND_CLOZE_DE"
54
+ TASK_STYLER = ClozeStyle().for_language(Language.DEU)
55
+
56
+
57
+ class ARC_ELLAMIND_MC_DE(_ARC_ELLAMIND_DE_Base):
58
+ """German ARC - Multiple-choice format."""
59
+
60
+ REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
61
+
62
+ NAME = "ARC_ELLAMIND_MC_DE"
63
+ TASK_STYLER = MCStyle().for_language(Language.DEU)
64
+
65
+
66
+ class ARC_ELLAMIND_BPB_DE(_ARC_ELLAMIND_DE_Base):
67
+ """German ARC - BPB format."""
68
+
69
+ REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE
70
+
71
+ NAME = "ARC_ELLAMIND_BPB_DE"
72
+ TASK_STYLER = BPBStyle().for_language(Language.DEU)
@@ -26,7 +26,6 @@ class COPAEvalHarness(BaseTask[str]):
26
26
  RESPONSE_TYPE = ResponseType.LOGLIKELIHOODS
27
27
  METRICS = [AccuracyLoglikelihood, AccuracyNormLoglikelihood]
28
28
  SUBJECTS = ["copa"]
29
- PERTURBATION_UNMODIFIABLE_WORDS = ["because", "therefore"]
30
29
  LANGUAGE = Language.ENG
31
30
 
32
31
  def _get_instruction_text(self, item: dict[str, Any]) -> str:
@@ -22,7 +22,6 @@ class CommonsenseQACloze(BaseTask[str]):
22
22
  RESPONSE_TYPE = ResponseType.LOGLIKELIHOODS
23
23
  METRICS = [AccuracyLoglikelihood, AccuracyNormLoglikelihood, BitsPerByteLoglikelihood]
24
24
  SUBJECTS = [NO_SUBJECT]
25
- PERTURBATION_UNMODIFIABLE_WORDS = ["Question"]
26
25
  LANGUAGE = Language.ENG
27
26
 
28
27
  def __init__(self, num_fewshot: int = 0) -> None: