eval-framework 0.6.3__tar.gz → 0.6.4__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.3 → eval_framework-0.6.4}/PKG-INFO +1 -1
- {eval_framework-0.6.3 → eval_framework-0.6.4}/pyproject.toml +1 -1
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/context/determined.py +6 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/context/eval.py +2 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/context/local.py +1 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/response_generator.py +7 -2
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/run.py +8 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/suite.py +2 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/base.py +23 -2
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/eval_config.py +4 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/registry.py +32 -5
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/task_names.py +1 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/LICENSE +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/README.md +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/base_config.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/context/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/evaluation_generator.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/exceptions.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/external/drop_process_results.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/external/ifeval_impl/README.md +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/external/ifeval_impl/instructions.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/external/ifeval_impl/instructions_registry.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/external/ifeval_impl/instructions_util.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/external/ifeval_impl/utils.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/llm/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/llm/aleph_alpha.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/llm/base.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/llm/huggingface.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/llm/mistral.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/llm/models.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/llm/openai.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/llm/vllm.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/llm/vllm_local_server.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/logger.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/main.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/aggregators/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/aggregators/aggregators.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/base.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/accuracy_completion.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/bleu.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/chrf.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/code_assertion.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/code_execution_pass_at_one.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/concordance_index.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/csv_format.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/drop_completion.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/exponential_similarity.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/f1.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/format_checker.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/grid_difference.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/ifeval.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/json_format.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/language_checker.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/length_control.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/math_minerva_completion.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/math_reasoning_completion.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/minerva_math_utils.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/multipl_e_assertion.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/placeholder_checker.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/repetition.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/rouge_1.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/rouge_2.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/rouge_geometric_mean.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/rouge_l.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/ter.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/text_counter.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/efficiency/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/efficiency/bytes_per_sequence_position.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/base.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/chatbot_style_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/coherence_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/comparison_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/conciseness_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/contains_names_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/format_correctness_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/instruction_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/language.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/long_context_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/models.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/refusal_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/sql_quality_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/summary_world_knowledge_grader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_chatbot_style.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_coherence.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_completion_accuracy.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_conciseness.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_contains_names.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_format_correctness.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_instruction.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_mtbench_pair.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_mtbench_single.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_refusal.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_sql.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_world_knowledge.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/utils.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/accuracy_loglikelihood.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/base.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/bits_per_byte.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/confidence_weighted_accuracy.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/dcs.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/probability_mass.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/ternary.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/py.typed +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/result_processors/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/result_processors/base.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/result_processors/hf_uploader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/result_processors/result_processor.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/result_processors/wandb_uploader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/run_direct.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/shared/types.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/Dockerfile_codebench +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/arc.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/arc_de.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/bigcodebench.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/copa.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/csqa.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/drop.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/global_mmlu.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/goldenswag.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/gpqa.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/gsm8k.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/hellaswag.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/humaneval.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/ifeval.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/math_reasoning.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/mbpp.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/medqa.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/mmlu.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/mmlu_pro.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/multipl_e.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/naturalqs_open.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/piqa.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/sciq.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/social_iqa.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/squad.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/triviaqa.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/winogrande.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/dataset_revisions.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/hf-dataset-revisions.json +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/perturbation.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/task-dataset-revisions.json +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/task_loader.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/task_style.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/utils.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/utils/constants.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/utils/file_ops.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/utils/generate_task_docs.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/utils/helpers.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/utils/logging.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/utils/packaging.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/utils/tqdm_handler.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/template_formatting/README.md +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/template_formatting/__init__.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/template_formatting/formatter.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/template_formatting/mistral_formatter.py +0 -0
- {eval_framework-0.6.3 → eval_framework-0.6.4}/src/template_formatting/py.typed +0 -0
|
@@ -30,6 +30,7 @@ class TaskArgs(BaseModel):
|
|
|
30
30
|
judge_model_args: dict[str, Any] = {}
|
|
31
31
|
task_subjects: list[str] | None = None
|
|
32
32
|
hf_revision: str | None = None
|
|
33
|
+
user_prompt_suffix: str | None = None
|
|
33
34
|
perturbation_config: PerturbationConfig | None = None
|
|
34
35
|
repeats: int | None = None
|
|
35
36
|
|
|
@@ -108,6 +109,7 @@ class DeterminedContext(EvalContext):
|
|
|
108
109
|
"task_subjects",
|
|
109
110
|
"batch_size",
|
|
110
111
|
"hf_revision",
|
|
112
|
+
"user_prompt_suffix",
|
|
111
113
|
"judge_model_name",
|
|
112
114
|
"judge_model_args",
|
|
113
115
|
"perturbation_config",
|
|
@@ -121,6 +123,9 @@ class DeterminedContext(EvalContext):
|
|
|
121
123
|
# Hyperparameters take precedence over core context
|
|
122
124
|
llm_name = self.hparams.llm_name or self.llm_name
|
|
123
125
|
judge_model_name = self.hparams.task_args.judge_model_name or self.judge_model_name
|
|
126
|
+
user_prompt_suffix = self.hparams.task_args.user_prompt_suffix
|
|
127
|
+
if user_prompt_suffix is None:
|
|
128
|
+
user_prompt_suffix = self.user_prompt_suffix
|
|
124
129
|
|
|
125
130
|
llm_class = _load_model(llm_name, models_path=self.models_path)
|
|
126
131
|
llm_judge_class: type[BaseLLM] | None = (
|
|
@@ -139,6 +144,7 @@ class DeterminedContext(EvalContext):
|
|
|
139
144
|
task_name=self.hparams.task_args.task_name,
|
|
140
145
|
task_subjects=self.hparams.task_args.task_subjects,
|
|
141
146
|
hf_revision=self.hparams.task_args.hf_revision or self.hf_revision,
|
|
147
|
+
user_prompt_suffix=user_prompt_suffix,
|
|
142
148
|
perturbation_config=self.hparams.task_args.perturbation_config or self.perturbation_config,
|
|
143
149
|
output_dir=self.hparams.output_dir,
|
|
144
150
|
llm_judge_class=llm_judge_class,
|
|
@@ -57,6 +57,7 @@ class EvalContext(AbstractContextManager):
|
|
|
57
57
|
task_name: str | None = None,
|
|
58
58
|
task_subjects: list[str] | None = None,
|
|
59
59
|
hf_revision: str | None = None,
|
|
60
|
+
user_prompt_suffix: str | None = None,
|
|
60
61
|
output_dir: Path | None = None,
|
|
61
62
|
wandb_project: str | None = None,
|
|
62
63
|
wandb_entity: str | None = None,
|
|
@@ -86,6 +87,7 @@ class EvalContext(AbstractContextManager):
|
|
|
86
87
|
self.task_name = task_name
|
|
87
88
|
self.task_subjects = task_subjects
|
|
88
89
|
self.hf_revision = hf_revision
|
|
90
|
+
self.user_prompt_suffix = user_prompt_suffix
|
|
89
91
|
self.output_dir = output_dir
|
|
90
92
|
self.wandb_project = wandb_project
|
|
91
93
|
self.wandb_entity = wandb_entity
|
|
@@ -52,6 +52,7 @@ class LocalContext(EvalContext):
|
|
|
52
52
|
task_name=self.task_name,
|
|
53
53
|
task_subjects=self.task_subjects,
|
|
54
54
|
hf_revision=self.hf_revision,
|
|
55
|
+
user_prompt_suffix=self.user_prompt_suffix,
|
|
55
56
|
output_dir=self.output_dir,
|
|
56
57
|
hf_upload_dir=self.hf_upload_dir,
|
|
57
58
|
hf_upload_repo=self.hf_upload_repo,
|
|
@@ -66,10 +66,14 @@ class ResponseGenerator:
|
|
|
66
66
|
config.num_fewshot,
|
|
67
67
|
config.task_subjects,
|
|
68
68
|
config.hf_revision,
|
|
69
|
+
user_prompt_suffix=config.user_prompt_suffix,
|
|
69
70
|
)
|
|
70
71
|
else:
|
|
71
72
|
self.task = registry()[config.task_name].create(
|
|
72
|
-
config.num_fewshot,
|
|
73
|
+
config.num_fewshot,
|
|
74
|
+
config.task_subjects,
|
|
75
|
+
config.hf_revision,
|
|
76
|
+
user_prompt_suffix=config.user_prompt_suffix,
|
|
73
77
|
)
|
|
74
78
|
|
|
75
79
|
self.response_type = self.task.get_response_type()
|
|
@@ -345,9 +349,10 @@ class ResponseGenerator:
|
|
|
345
349
|
"llm_args",
|
|
346
350
|
"perturbation_config",
|
|
347
351
|
"repeats",
|
|
352
|
+
"user_prompt_suffix",
|
|
348
353
|
]
|
|
349
354
|
for key in keys:
|
|
350
|
-
if loaded_metadata
|
|
355
|
+
if loaded_metadata.get(key) != current_metadata[key]:
|
|
351
356
|
raise ValueError(f"Existing metadata does not match current metadata for {key}.")
|
|
352
357
|
|
|
353
358
|
def __del__(self) -> None:
|
|
@@ -150,6 +150,13 @@ def parse_args() -> argparse.Namespace:
|
|
|
150
150
|
default=None,
|
|
151
151
|
help="A tag name, a branch name, or commit hash for the task HF dataset.",
|
|
152
152
|
)
|
|
153
|
+
parser.add_argument(
|
|
154
|
+
"--user-prompt-suffix",
|
|
155
|
+
type=str,
|
|
156
|
+
required=False,
|
|
157
|
+
default=None,
|
|
158
|
+
help="Text appended verbatim to the evaluated user prompt before formatting.",
|
|
159
|
+
)
|
|
153
160
|
parser.add_argument(
|
|
154
161
|
"--judge-models",
|
|
155
162
|
type=Path,
|
|
@@ -343,6 +350,7 @@ def _run_single_task(kwargs: dict) -> None:
|
|
|
343
350
|
task_name=kwargs["task_name"],
|
|
344
351
|
task_subjects=kwargs["task_subjects"],
|
|
345
352
|
hf_revision=kwargs["hf_revision"],
|
|
353
|
+
user_prompt_suffix=kwargs.get("user_prompt_suffix"),
|
|
346
354
|
output_dir=kwargs["output_dir"],
|
|
347
355
|
wandb_project=kwargs["wandb_project"],
|
|
348
356
|
wandb_entity=kwargs["wandb_entity"],
|
|
@@ -34,6 +34,7 @@ _EVAL_CONFIG_FIELDS = {
|
|
|
34
34
|
"batch_size",
|
|
35
35
|
"task_subjects",
|
|
36
36
|
"hf_revision",
|
|
37
|
+
"user_prompt_suffix",
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
_HYPERPARAM_FIELDS = _LLM_ARG_FIELDS | _EVAL_CONFIG_FIELDS
|
|
@@ -100,6 +101,7 @@ class TaskSuite(BaseModel):
|
|
|
100
101
|
batch_size: int | None = None
|
|
101
102
|
task_subjects: list[str] | None = None
|
|
102
103
|
hf_revision: str | None = None
|
|
104
|
+
user_prompt_suffix: str | None = None
|
|
103
105
|
|
|
104
106
|
@model_validator(mode="after")
|
|
105
107
|
def validate_suite(self) -> Self:
|
|
@@ -115,6 +115,7 @@ class BaseTask[SubjectType](ABC):
|
|
|
115
115
|
|
|
116
116
|
def __init__(self, num_fewshot: int = 0) -> None:
|
|
117
117
|
self.num_fewshot = num_fewshot
|
|
118
|
+
self.user_prompt_suffix: str | None = None
|
|
118
119
|
self.stop_sequences: list[str] | None = None
|
|
119
120
|
self.max_tokens: int | None = None
|
|
120
121
|
self._apply_hf_revision()
|
|
@@ -129,9 +130,17 @@ class BaseTask[SubjectType](ABC):
|
|
|
129
130
|
|
|
130
131
|
@classmethod
|
|
131
132
|
def with_overwrite(
|
|
132
|
-
cls,
|
|
133
|
+
cls,
|
|
134
|
+
num_fewshot: int,
|
|
135
|
+
*,
|
|
136
|
+
custom_subjects: list[str] | None,
|
|
137
|
+
custom_hf_revision: str | None,
|
|
138
|
+
user_prompt_suffix: str | None = None,
|
|
133
139
|
) -> Self:
|
|
134
140
|
instance = cls(num_fewshot=num_fewshot)
|
|
141
|
+
if user_prompt_suffix is not None and instance.get_response_type() != ResponseType.COMPLETION:
|
|
142
|
+
raise ValueError("user_prompt_suffix is only supported for completion tasks.")
|
|
143
|
+
instance.user_prompt_suffix = user_prompt_suffix
|
|
135
144
|
|
|
136
145
|
# If custom subjects were provided during initialization, they take precedence over the class-level SUBJECTS.
|
|
137
146
|
filtered_subjects = instance._filter_task_subjects(custom_subjects=custom_subjects)
|
|
@@ -241,7 +250,7 @@ class BaseTask[SubjectType](ABC):
|
|
|
241
250
|
|
|
242
251
|
def _get_messages(self, item: dict[str, Any]) -> list[Message]:
|
|
243
252
|
example_messages = self._get_example_messages(item)
|
|
244
|
-
instruction_message = self._get_instruction_messages(item)
|
|
253
|
+
instruction_message = self._apply_user_prompt_suffix(self._get_instruction_messages(item))
|
|
245
254
|
cue_text = self._get_cue_text(item)
|
|
246
255
|
cue_message = [Message(role=Role.ASSISTANT, content=cue_text)] if cue_text else []
|
|
247
256
|
messages = example_messages + instruction_message + cue_message
|
|
@@ -254,6 +263,18 @@ class BaseTask[SubjectType](ABC):
|
|
|
254
263
|
return [Message(role=Role.SYSTEM, content=system_prompt_text)] + messages
|
|
255
264
|
return messages
|
|
256
265
|
|
|
266
|
+
def _apply_user_prompt_suffix(self, instruction_messages: list[Message]) -> list[Message]:
|
|
267
|
+
"""Append the configured suffix verbatim to the evaluated user turn."""
|
|
268
|
+
if self.user_prompt_suffix is None:
|
|
269
|
+
return instruction_messages
|
|
270
|
+
|
|
271
|
+
for message in reversed(instruction_messages):
|
|
272
|
+
if message.role == Role.USER:
|
|
273
|
+
message.content = f"{message.content}{self.user_prompt_suffix}"
|
|
274
|
+
return instruction_messages
|
|
275
|
+
|
|
276
|
+
raise ValueError("Cannot append user_prompt_suffix: evaluated instruction contains no user message.")
|
|
277
|
+
|
|
257
278
|
def _get_instruction_messages(self, item: dict[str, Any]) -> list[Message]:
|
|
258
279
|
return [Message(role=Role.USER, content=self._get_instruction_text(item))]
|
|
259
280
|
|
|
@@ -47,6 +47,7 @@ class EvalConfig(BaseConfig):
|
|
|
47
47
|
task_name: Annotated[str, AfterValidator(validate_task_name)]
|
|
48
48
|
task_subjects: list[str] | None = None
|
|
49
49
|
hf_revision: str | None = None
|
|
50
|
+
user_prompt_suffix: str | None = None
|
|
50
51
|
llm_class: type[BaseLLM]
|
|
51
52
|
llm_args: dict[str, Any] = Field(default_factory=dict)
|
|
52
53
|
llm_judge_class: type[BaseLLM] | None = None
|
|
@@ -141,4 +142,7 @@ class EvalConfig(BaseConfig):
|
|
|
141
142
|
|
|
142
143
|
def model_json_robust_subset_dump(self) -> str:
|
|
143
144
|
model_dump = self.model_dump(mode="json", exclude=KEYS_UNRELATED_TO_RESULTS)
|
|
145
|
+
# Preserve hashes for evaluations created before this optional field existed.
|
|
146
|
+
if self.user_prompt_suffix is None:
|
|
147
|
+
model_dump.pop("user_prompt_suffix", None)
|
|
144
148
|
return json.dumps(model_dump, sort_keys=True)
|
|
@@ -62,7 +62,11 @@ class EvalFactory(ABC):
|
|
|
62
62
|
|
|
63
63
|
@abstractmethod
|
|
64
64
|
def create(
|
|
65
|
-
self,
|
|
65
|
+
self,
|
|
66
|
+
num_fewshot: int,
|
|
67
|
+
custom_subjects: list[str] | None,
|
|
68
|
+
custom_hf_revision: str | None,
|
|
69
|
+
user_prompt_suffix: str | None = None,
|
|
66
70
|
) -> BaseTask: ...
|
|
67
71
|
|
|
68
72
|
@abstractmethod
|
|
@@ -72,6 +76,7 @@ class EvalFactory(ABC):
|
|
|
72
76
|
num_fewshot: int,
|
|
73
77
|
custom_subjects: list[str] | None,
|
|
74
78
|
custom_hf_revision: str | None,
|
|
79
|
+
user_prompt_suffix: str | None = None,
|
|
75
80
|
) -> BaseTask: ...
|
|
76
81
|
|
|
77
82
|
|
|
@@ -101,9 +106,18 @@ class _Lazy(EvalFactory):
|
|
|
101
106
|
self._loaded = getattr(module, self._class_name)
|
|
102
107
|
return self._loaded
|
|
103
108
|
|
|
104
|
-
def create(
|
|
109
|
+
def create(
|
|
110
|
+
self,
|
|
111
|
+
num_fewshot: int,
|
|
112
|
+
custom_subjects: list[str] | None,
|
|
113
|
+
custom_hf_revision: str | None,
|
|
114
|
+
user_prompt_suffix: str | None = None,
|
|
115
|
+
) -> BaseTask:
|
|
105
116
|
return self.task_class().with_overwrite(
|
|
106
|
-
num_fewshot=num_fewshot,
|
|
117
|
+
num_fewshot=num_fewshot,
|
|
118
|
+
custom_subjects=custom_subjects,
|
|
119
|
+
custom_hf_revision=custom_hf_revision,
|
|
120
|
+
user_prompt_suffix=user_prompt_suffix,
|
|
107
121
|
)
|
|
108
122
|
|
|
109
123
|
def create_perturbation(
|
|
@@ -112,12 +126,14 @@ class _Lazy(EvalFactory):
|
|
|
112
126
|
num_fewshot: int,
|
|
113
127
|
custom_subjects: list[str] | None,
|
|
114
128
|
custom_hf_revision: str | None,
|
|
129
|
+
user_prompt_suffix: str | None = None,
|
|
115
130
|
) -> BaseTask:
|
|
116
131
|
perturbation_task_class = create_perturbation_class(self.task_class(), perturbation_config)
|
|
117
132
|
return perturbation_task_class.with_overwrite(
|
|
118
133
|
num_fewshot=num_fewshot,
|
|
119
134
|
custom_subjects=custom_subjects,
|
|
120
135
|
custom_hf_revision=custom_hf_revision,
|
|
136
|
+
user_prompt_suffix=user_prompt_suffix,
|
|
121
137
|
)
|
|
122
138
|
|
|
123
139
|
def response_type(self) -> ResponseType:
|
|
@@ -149,9 +165,18 @@ class _Eager(EvalFactory):
|
|
|
149
165
|
def task_class(self) -> type[BaseTask]:
|
|
150
166
|
return self._task
|
|
151
167
|
|
|
152
|
-
def create(
|
|
168
|
+
def create(
|
|
169
|
+
self,
|
|
170
|
+
num_fewshot: int,
|
|
171
|
+
custom_subjects: list[str] | None,
|
|
172
|
+
custom_hf_revision: str | None,
|
|
173
|
+
user_prompt_suffix: str | None = None,
|
|
174
|
+
) -> BaseTask:
|
|
153
175
|
return self.task_class().with_overwrite(
|
|
154
|
-
num_fewshot=num_fewshot,
|
|
176
|
+
num_fewshot=num_fewshot,
|
|
177
|
+
custom_subjects=custom_subjects,
|
|
178
|
+
custom_hf_revision=custom_hf_revision,
|
|
179
|
+
user_prompt_suffix=user_prompt_suffix,
|
|
155
180
|
)
|
|
156
181
|
|
|
157
182
|
def create_perturbation(
|
|
@@ -160,12 +185,14 @@ class _Eager(EvalFactory):
|
|
|
160
185
|
num_fewshot: int,
|
|
161
186
|
custom_subjects: list[str] | None,
|
|
162
187
|
custom_hf_revision: str | None,
|
|
188
|
+
user_prompt_suffix: str | None = None,
|
|
163
189
|
) -> BaseTask:
|
|
164
190
|
perturbation_task_class = create_perturbation_class(self.task_class(), perturbation_config)
|
|
165
191
|
return perturbation_task_class.with_overwrite(
|
|
166
192
|
num_fewshot=num_fewshot,
|
|
167
193
|
custom_subjects=custom_subjects,
|
|
168
194
|
custom_hf_revision=custom_hf_revision,
|
|
195
|
+
user_prompt_suffix=user_prompt_suffix,
|
|
169
196
|
)
|
|
170
197
|
|
|
171
198
|
def response_type(self) -> ResponseType:
|
|
@@ -63,6 +63,7 @@ def register_all_tasks() -> None:
|
|
|
63
63
|
register_lazy_task("eval_framework.tasks.benchmarks.mmlu.MMLU")
|
|
64
64
|
register_lazy_task("eval_framework.tasks.benchmarks.mmlu.MMLU_IDK")
|
|
65
65
|
register_lazy_task("eval_framework.tasks.benchmarks.mmlu.MMLU_OLMES")
|
|
66
|
+
register_lazy_task("eval_framework.tasks.benchmarks.mmlu.FullTextMMLU")
|
|
66
67
|
register_lazy_task("eval_framework.tasks.benchmarks.mmlu_pro.MMLU_PRO")
|
|
67
68
|
register_lazy_task("eval_framework.tasks.benchmarks.mmlu_pro.MMLU_PRO_IDK")
|
|
68
69
|
register_lazy_task("eval_framework.tasks.benchmarks.mmlu_pro.MMLU_PRO_OLMES")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/external/drop_process_results.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/external/ifeval_impl/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/external/ifeval_impl/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/aggregators/__init__.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/aggregators/aggregators.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/csv_format.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/ifeval.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/json_format.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/repetition.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/rouge_1.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/rouge_2.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/rouge_l.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/completion/text_counter.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/efficiency/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/language.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/graders/models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_coherence.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_refusal.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/llm/llm_judge_sql.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/dcs.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/metrics/loglikelihood/ternary.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/result_processors/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/result_processors/hf_uploader.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/result_processors/wandb_uploader.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/bigcodebench.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/global_mmlu.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/goldenswag.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/hellaswag.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/humaneval.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/math_reasoning.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/mmlu_pro.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/multipl_e.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/naturalqs_open.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/social_iqa.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/triviaqa.py
RENAMED
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/benchmarks/winogrande.py
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/hf-dataset-revisions.json
RENAMED
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/tasks/task-dataset-revisions.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eval_framework-0.6.3 → eval_framework-0.6.4}/src/eval_framework/utils/generate_task_docs.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|