MCPcopy Index your code
hub / github.com/evalplus/evalplus / correctness_worker

Function correctness_worker

evalplus/evalperf.py:115–137  ·  view source on GitHub ↗
(task_id: str, samples: list, ctask: Dict, expected_output: Dict)

Source from the content-addressed store, hash-verified

113
114
115def correctness_worker(task_id: str, samples: list, ctask: Dict, expected_output: Dict):
116 assert isinstance(
117 samples, list
118 ), f"{task_id}: samples is not a list but {type(samples)}"
119
120 results = []
121
122 for solution in samples:
123 result, solution = correctness_check(
124 solution, task_id.split("/")[0].lower(), ctask, expected_output
125 )
126 results.append(
127 {
128 "solution": solution,
129 "pass": result[0] == PASS,
130 "profiled": False,
131 "matching_cluster_idx": None,
132 "dps": None,
133 "dps_norm": None,
134 }
135 )
136
137 return task_id, results
138
139
140def perf_worker(

Callers

nothing calls this directly

Calls 1

correctness_checkFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…