Skip to content

Commit

Permalink
update fusion_bench/dataset/gsm8k.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tanganke committed Oct 17, 2024
1 parent 64017dc commit 6dd4687
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fusion_bench/dataset/gsm8k.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re
from typing import Literal

import datasets
from datasets import load_dataset


Expand Down Expand Up @@ -36,3 +37,10 @@ def load_gsm8k_question_label_data(
questions.append(sample["question"])

return questions, labels


def load_gsm8k_question_label_dataset(
dataset_name: Literal["train", "test", "train_socratic", "test_socratic"]
):
question, labels = load_gsm8k_question_label_data(dataset_name)
return datasets.Dataset.from_dict({"question": question, "label": labels})

0 comments on commit 6dd4687

Please sign in to comment.