anand-s commited on
Commit
53976be
·
verified ·
1 Parent(s): 27e194c

Update test_repo.py

Browse files
Files changed (1) hide show
  1. test_repo.py +15 -13
test_repo.py CHANGED
@@ -102,12 +102,12 @@ class TestRepo(datasets.GeneratorBasedBuilder):
102
  "question_type": datasets.Value("string"),
103
  "dataset_name": datasets.Value("string"),
104
  "context": datasets.Sequence(datasets.Value("string")),
105
- # "few_shot_prompt": [{
106
- # "question": datasets.Value("string"),
107
- # "answer": datasets.Value("string"),
108
- # "options": datasets.Sequence(datasets.Value("string")),
109
- # "context": datasets.Sequence(datasets.Value("string")),
110
- # }],
111
  }),
112
  "test_context_mcqa": datasets.Features({
113
  "prompt": datasets.Value("string"),
@@ -118,12 +118,12 @@ class TestRepo(datasets.GeneratorBasedBuilder):
118
  "question_type": datasets.Value("string"),
119
  "dataset_name": datasets.Value("string"),
120
  "context": datasets.Sequence(datasets.Value("string")),
121
- # "few_shot_prompt": datasets.Sequence(datasets.Features({
122
- # "question": datasets.Value("string"),
123
- # "answer": datasets.Value("string"),
124
- # "options": datasets.Sequence(datasets.Value("string")),
125
- # "context": datasets.Sequence(datasets.Value("string")),
126
- # })),
127
  })
128
  }
129
 
@@ -203,6 +203,8 @@ class TestRepo(datasets.GeneratorBasedBuilder):
203
  "options": data["options"],
204
  "answer": data["answer"],
205
  "num_options": data["num_options"],
 
206
  "question_type": data["question_type"],
207
- "dataset_name": os.path.split(filepath)[-1].replace(".jsonl","") }
 
208
  key_idx +=1
 
102
  "question_type": datasets.Value("string"),
103
  "dataset_name": datasets.Value("string"),
104
  "context": datasets.Sequence(datasets.Value("string")),
105
+ "few_shot_prompt": [{
106
+ "question": datasets.Value("string"),
107
+ "answer": datasets.Value("string"),
108
+ "options": datasets.Sequence(datasets.Value("string")),
109
+ "context": datasets.Sequence(datasets.Value("string")),
110
+ }],
111
  }),
112
  "test_context_mcqa": datasets.Features({
113
  "prompt": datasets.Value("string"),
 
118
  "question_type": datasets.Value("string"),
119
  "dataset_name": datasets.Value("string"),
120
  "context": datasets.Sequence(datasets.Value("string")),
121
+ "few_shot_prompt": datasets.Sequence(datasets.Features({
122
+ "question": datasets.Value("string"),
123
+ "answer": datasets.Value("string"),
124
+ "options": datasets.Sequence(datasets.Value("string")),
125
+ "context": datasets.Sequence(datasets.Value("string")),
126
+ })),
127
  })
128
  }
129
 
 
203
  "options": data["options"],
204
  "answer": data["answer"],
205
  "num_options": data["num_options"],
206
+ "context": data["context"],
207
  "question_type": data["question_type"],
208
+ "dataset_name": os.path.split(filepath)[-1].replace(".jsonl",""),
209
+ "few_shot_prompt": data["few_shot_prompt"]}
210
  key_idx +=1