thepurpleowl commited on
Commit
1ebe910
1 Parent(s): 4b0019e

Update codequeries.py

Browse files
Files changed (1) hide show
  1. codequeries.py +5 -4
codequeries.py CHANGED
@@ -159,6 +159,7 @@ class Codequeries(datasets.GeneratorBasedBuilder):
159
  features["example_type"] = datasets.Value("int32")
160
  features["subtokenized_input_sequence"] = datasets.features.Sequence(datasets.Value("string"))
161
  features["label_sequence"] = datasets.features.Sequence(datasets.Value("int32"))
 
162
 
163
  return datasets.DatasetInfo(
164
  description=self.config.description,
@@ -185,21 +186,21 @@ class Codequeries(datasets.GeneratorBasedBuilder):
185
  datasets.SplitGenerator(
186
  name=datasets.Split.TRAIN,
187
  gen_kwargs={
188
- "filepath": os.path.join(dl_dir["train"]),
189
  "split": datasets.Split.TRAIN,
190
  },
191
  ),
192
  datasets.SplitGenerator(
193
  name=datasets.Split.VALIDATION,
194
  gen_kwargs={
195
- "filepath": os.path.join(dl_dir["dev"]),
196
  "split": datasets.Split.VALIDATION,
197
  },
198
  ),
199
  datasets.SplitGenerator(
200
  name=datasets.Split.TEST,
201
  gen_kwargs={
202
- "filepath": os.path.join(dl_dir["test"]),
203
  "split": datasets.Split.TEST,
204
  },
205
  ),
@@ -226,7 +227,7 @@ class Codequeries(datasets.GeneratorBasedBuilder):
226
  "code_file_path": row["code_file_path"],
227
  "example_type": row["example_type"],
228
  "subtokenized_input_sequence": row["subtokenized_input_sequence"],
229
- "label_sequence": row["label_sequence"],
230
  }
231
  key += 1
232
  else:
 
159
  features["example_type"] = datasets.Value("int32")
160
  features["subtokenized_input_sequence"] = datasets.features.Sequence(datasets.Value("string"))
161
  features["label_sequence"] = datasets.features.Sequence(datasets.Value("int32"))
162
+ features["relevance_label"] = datasets.Value("int32")
163
 
164
  return datasets.DatasetInfo(
165
  description=self.config.description,
 
186
  datasets.SplitGenerator(
187
  name=datasets.Split.TRAIN,
188
  gen_kwargs={
189
+ "filepath": dl_dir["train"],
190
  "split": datasets.Split.TRAIN,
191
  },
192
  ),
193
  datasets.SplitGenerator(
194
  name=datasets.Split.VALIDATION,
195
  gen_kwargs={
196
+ "filepath": dl_dir["dev"],
197
  "split": datasets.Split.VALIDATION,
198
  },
199
  ),
200
  datasets.SplitGenerator(
201
  name=datasets.Split.TEST,
202
  gen_kwargs={
203
+ "filepath": dl_dir["test"],
204
  "split": datasets.Split.TEST,
205
  },
206
  ),
 
227
  "code_file_path": row["code_file_path"],
228
  "example_type": row["example_type"],
229
  "subtokenized_input_sequence": row["subtokenized_input_sequence"],
230
+ "relevance_label": row["relevance_label"],
231
  }
232
  key += 1
233
  else: