(completions, solution: list[dict], resolution, bboxs, step_id, **kwargs)
| 332 | |
| 333 | |
| 334 | def react_check(completions, solution: list[dict], resolution, bboxs, step_id, **kwargs): |
| 335 | global global_executor |
| 336 | futures = [global_executor.submit(_react_check,completion[0]["content"],sol,reso,bbox,step) for completion,sol,reso,bbox,step in zip(completions,solution,resolution,bboxs,step_id)] |
| 337 | |
| 338 | scores = [] |
| 339 | for future in futures: |
| 340 | try: |
| 341 | scores.append(future.result(timeout=5)) |
| 342 | except TimeoutError as e: |
| 343 | print("Timeout while checking type.") |
| 344 | scores.append(-1.0) |
| 345 | |
| 346 | return scores |
| 347 | |
| 348 | def calculate_manhattan_distance(x1, y1, x2, y2): |
| 349 | return abs(x1 - x2) + abs(y1 - y2) |
nothing calls this directly
no outgoing calls
no test coverage detected