|
13 | 13 | from lighteval.metrics.stderr import get_stderr_function |
14 | 14 | from lighteval.models.model_loader import ModelInfo |
15 | 15 | from lighteval.models.model_output import ModelReturn |
16 | | -from lighteval.tasks.lighteval_task import LightevalTask |
| 16 | +from lighteval.tasks.lighteval_task import LightevalTask, LightevalTaskConfig |
17 | 17 | from lighteval.tasks.requests import Doc |
18 | 18 | from lighteval.utils import as_list, is_nanotron_available, sanitize_numpy |
19 | 19 |
|
@@ -497,53 +497,11 @@ class TaskConfigLogger: |
497 | 497 | """Logs the different parameters of the current [`LightevalTask`] of interest. |
498 | 498 |
|
499 | 499 | Attributes: |
500 | | - tasks_config (dict[str, TaskConfig]): Maps each task to its associated [`TaskConfig`] |
| 500 | + tasks_config (dict[str, LightevalTaskConfig]): Maps each task to its associated [`LightevalTaskConfig`] |
501 | 501 |
|
502 | 502 | """ |
503 | 503 |
|
504 | | - @dataclass |
505 | | - class TaskConfig: |
506 | | - """Stored configuration of a given [`LightevalTask`]. |
507 | | -
|
508 | | - Arguments: |
509 | | - name (str): Short name of the evaluation task. |
510 | | - suite (list[str]): Evaluation suites to which the task belongs. |
511 | | - prompt_function (str): Name of the function used to create the [`Doc`] samples from each line of the evaluation dataset. |
512 | | - hf_repo (str): Path of the hub dataset repository containing the evaluation information. |
513 | | - hf_subset (str): Subset used for the current task, will be default if none is selected. |
514 | | - hf_avail_splits (list[str]): All the available splits in the evaluation dataset |
515 | | - evaluation_splits (list[str]): List of the splits actually used for this evaluation |
516 | | - few_shots_split (str): Name of the split from which to sample few-shot examples |
517 | | - few_shots_select (str): Method with which to sample few-shot examples |
518 | | - generation_size (int): Maximum allowed size of the generation |
519 | | - metric (list[str]): List of all the metrics for the current task. |
520 | | - stop_sequence (list[str]): Stop sequence which interrupts the generation for generative metrics. |
521 | | - original_num_docs (int): Number of documents in the task |
522 | | - effective_num_docs (int): Number of documents used in a specific evaluation |
523 | | - truncated_num_docs (bool): Whether less than the total number of documents were used |
524 | | - output_regex (str) |
525 | | - frozen (bool) |
526 | | -
|
527 | | - """ |
528 | | - |
529 | | - name: str |
530 | | - suite: list[str] |
531 | | - prompt_function: str |
532 | | - hf_repo: str |
533 | | - hf_subset: str |
534 | | - hf_avail_splits: list[str] |
535 | | - evaluation_splits: list[str] |
536 | | - few_shots_split: str |
537 | | - few_shots_select: str |
538 | | - generation_size: int |
539 | | - metric: list[str] |
540 | | - stop_sequence: list[str] |
541 | | - output_regex: str |
542 | | - frozen: bool |
543 | | - original_num_docs: int = -1 |
544 | | - effective_num_docs: int = -1 |
545 | | - |
546 | | - tasks_configs: dict[str, TaskConfig] = {} |
| 504 | + tasks_configs: dict[str, LightevalTaskConfig] = {} |
547 | 505 |
|
548 | 506 | def log(self, task_dict: dict[str, LightevalTask]) -> None: |
549 | 507 | self.tasks_configs = {name: task.cfg for name, task in task_dict.items()} |
|
0 commit comments