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

Method _create_examples

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

Source from the content-addressed store, hash-verified

1262
1263 @staticmethod
1264 def _create_examples(path: str, set_type: str) -> List[InputExample]:
1265 examples = []
1266 df = read_tsv(path)
1267
1268 for idx, row in df.iterrows():
1269 guid = f"{set_type}-{idx}"
1270 text_a = punctuation_standardization(row['question'])
1271 text_b = punctuation_standardization(row['sentence'])
1272 label = row.get('label', None)
1273 example = InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)
1274 examples.append(example)
1275
1276 return examples
1277
1278
1279class SquadProcessor(DataProcessor):

Callers

nothing calls this directly

Calls 4

InputExampleClass · 0.90
read_tsvFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected