(
dataset: str,
files: List[str],
inputs: List,
expected: List,
entry_point: str,
atol: float,
ref_time: List[float],
fast_check: bool = False,
min_time_limit: float = DEFAULT_MIN_TIME_LIMIT,
gt_time_limit_factor: float = DEFAULT_GT_TIME_LIMIT_FACTOR,
)
| 282 | |
| 283 | |
| 284 | def evaluate_files( |
| 285 | dataset: str, |
| 286 | files: List[str], |
| 287 | inputs: List, |
| 288 | expected: List, |
| 289 | entry_point: str, |
| 290 | atol: float, |
| 291 | ref_time: List[float], |
| 292 | fast_check: bool = False, |
| 293 | min_time_limit: float = DEFAULT_MIN_TIME_LIMIT, |
| 294 | gt_time_limit_factor: float = DEFAULT_GT_TIME_LIMIT_FACTOR, |
| 295 | ) -> List[Tuple[str, List[bool]]]: |
| 296 | ret = [] |
| 297 | # sort files by the id in name (i.e., "../n.py") |
| 298 | files = sorted(files, key=lambda x: int(x.split("/")[-1].split(".")[0])) |
| 299 | for file in files: |
| 300 | code = open(file, "r").read() |
| 301 | stat, det = untrusted_check( |
| 302 | dataset, |
| 303 | code, |
| 304 | inputs, |
| 305 | entry_point, |
| 306 | expected=expected, |
| 307 | atol=atol, |
| 308 | ref_time=ref_time, |
| 309 | fast_check=fast_check, |
| 310 | min_time_limit=min_time_limit, |
| 311 | gt_time_limit_factor=gt_time_limit_factor, |
| 312 | ) |
| 313 | ret.append((stat, det.tolist())) |
| 314 | return ret |
nothing calls this directly
no test coverage detected