MCPcopy Create free account
hub / github.com/OpenBMB/DecT / get_examples

Method get_examples

src/process_data.py:269–279  ·  view source on GitHub ↗
(self, data_dir, split)

Source from the content-addressed store, hash-verified

267 self.labels = ["1", "2"]
268
269 def get_examples(self, data_dir, split):
270 path = os.path.join(data_dir, "{}.csv".format(self.dataset_project[split]))
271 df = pd.read_csv(path, header=None)
272 examples = []
273 for idx, (label, text) in enumerate(zip(df[0], df[1])):
274 text_a = text
275 label = self.get_label_id(str(label))
276 example = InputExample(
277 guid=str(idx), text_a=text_a, text_b="", label=label)
278 examples.append(example)
279 return examples
280
281
282class RteProcessor(DataProcessor):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected