Commit 792a9c2b authored by Rayyyyy's avatar Rayyyyy
Browse files

Modify bugs in hellaswag

parent 6e092c81
...@@ -26,6 +26,7 @@ import numpy as np ...@@ -26,6 +26,7 @@ import numpy as np
from tqdm import tqdm from tqdm import tqdm
from lm_eval import utils from lm_eval import utils
from lm_eval.datasets.hellaswag import hellaswag
from lm_eval.api import samplers from lm_eval.api import samplers
from lm_eval.api.instance import Instance, OutputType from lm_eval.api.instance import Instance, OutputType
from lm_eval.api.metrics import bits_per_byte, mean, weighted_perplexity from lm_eval.api.metrics import bits_per_byte, mean, weighted_perplexity
...@@ -51,6 +52,7 @@ ALL_OUTPUT_TYPES = [ ...@@ -51,6 +52,7 @@ ALL_OUTPUT_TYPES = [
eval_logger = logging.getLogger("lm-eval") eval_logger = logging.getLogger("lm-eval")
CLASS_DATASETS = {'hellaswag': hellaswag }
@dataclass @dataclass
class TaskConfig(dict): class TaskConfig(dict):
...@@ -708,7 +710,7 @@ class ConfigurableTask(Task): ...@@ -708,7 +710,7 @@ class ConfigurableTask(Task):
self.OUTPUT_TYPE = self.config.output_type self.OUTPUT_TYPE = self.config.output_type
if self.config.dataset_path is not None: if self.config.dataset_path is not None:
self.DATASET_PATH = inspect.getfile(self.config.dataset_path) self.DATASET_PATH = inspect.getfile(CLASS_DATASETS[self.config.dataset_name])
if self.config.dataset_name is not None: if self.config.dataset_name is not None:
self.DATASET_NAME = self.config.dataset_name self.DATASET_NAME = self.config.dataset_name
......
group: group:
- multiple_choice - multiple_choice
task: hellaswag task: hellaswag
dataset_path: lm_eval.datasets.hellaswag.hellaswag dataset_path: None
dataset_name: hellaswag dataset_name: hellaswag
output_type: multiple_choice output_type: multiple_choice
training_split: train training_split: train
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment