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

Function _parse

opencompass/datasets/SciKnowEval.py:11–21  ·  view source on GitHub ↗
(item, prompt_mode, discipline)

Source from the content-addressed store, hash-verified

9
10
11def _parse(item, prompt_mode, discipline):
12 choices = item['choices']
13
14 item['q4'] = f'You are an expert in {discipline}.\n'
15 item['q4'] += item['prompt']['default'] + '\n' + item['question'] + '\n'
16 label_texts = []
17 for label_meta, text_meta in zip(choices['label'], choices['text']):
18 label_texts.append(f'{label_meta}. {text_meta}')
19 item['q4'] += '\n'.join(label_texts) # noqa: E501, E741, E741
20 item['prompt_mode'] = prompt_mode
21 return item
22
23
24@LOAD_DATASET.register_module()

Callers 1

loadMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected