MCPcopy Create free account
hub / github.com/THUDM/GLM / _create_examples

Method _create_examples

tasks/superglue/dataset.py:1243–1255  ·  view source on GitHub ↗
(path: str, set_type: str)

Source from the content-addressed store, hash-verified

1241
1242 @staticmethod
1243 def _create_examples(path: str, set_type: str) -> List[InputExample]:
1244 examples = []
1245 df = read_tsv(path)
1246
1247 for idx, row in df.iterrows():
1248 guid = f"{set_type}-{idx}"
1249 text_a = punctuation_standardization(row['question1'])
1250 text_b = punctuation_standardization(row['question2'])
1251 label = row.get('is_duplicate', None)
1252 example = InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)
1253 examples.append(example)
1254
1255 return examples
1256
1257
1258class QnliProcessor(Sst2Processor):

Callers

nothing calls this directly

Calls 4

InputExampleClass · 0.90
read_tsvFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected