MCPcopy Create free account
hub / github.com/InternScience/SciReason / _parse

Function _parse

opencompass/datasets/supergpqa/supergpqa.py:16–25  ·  view source on GitHub ↗
(item, template, prompt_mode)

Source from the content-addressed store, hash-verified

14
15
16def _parse(item, template, prompt_mode):
17 prompt_format = [
18 item['question'] + '\n' + '\n'.join([
19 f'{chr(65+i)}) {option}'
20 for i, option in enumerate(item['options'])
21 ])
22 ]
23 item['infer_prompt'] = template['prompt_format'][0].format(*prompt_format)
24 item['prompt_mode'] = prompt_mode
25 return item
26
27
28@LOAD_DATASET.register_module()

Callers 1

loadMethod · 0.70

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected