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

Method _create_examples

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

Source from the content-addressed store, hash-verified

1220
1221 @staticmethod
1222 def _create_examples(path: str, set_type: str) -> List[InputExample]:
1223 examples = []
1224 df = read_tsv(path)
1225
1226 for idx, row in df.iterrows():
1227 guid = f"{set_type}-{idx}"
1228 text_a = punctuation_standardization(row['#1 String'])
1229 text_b = punctuation_standardization(row['#2 String'])
1230 label = row.get('Quality', None)
1231 example = InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)
1232 examples.append(example)
1233
1234 return examples
1235
1236
1237class QqpProcessor(Sst2Processor):

Callers

nothing calls this directly

Calls 4

InputExampleClass · 0.90
read_tsvFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected