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

Method load

opencompass/datasets/math_intern.py:69–82  ·  view source on GitHub ↗
(path: str)

Source from the content-addressed store, hash-verified

67
68 @staticmethod
69 def load(path: str):
70 dataset = DatasetDict()
71 data = json.load(open(path))
72 raw_data = []
73 for i in data.keys():
74 raw_data.append({
75 'problem':
76 data[i]['problem'],
77 'solution':
78 extract_boxed_answer(data[i]['solution'])
79 })
80 dataset['test'] = Dataset.from_list(raw_data)
81 dataset['train'] = Dataset.from_list(raw_data)
82 return dataset
83
84
85@ICL_EVALUATORS.register_module()

Callers

nothing calls this directly

Calls 2

openFunction · 0.85
extract_boxed_answerFunction · 0.70

Tested by

no test coverage detected