MCPcopy Create free account
hub / github.com/OpenBMB/AgentCPM-GUI / react_check

Function react_check

rft/trainer/utils/gui_eval.py:334–346  ·  view source on GitHub ↗
(completions, solution: list[dict], resolution, bboxs, step_id, **kwargs)

Source from the content-addressed store, hash-verified

332
333
334def 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
348def calculate_manhattan_distance(x1, y1, x2, y2):
349 return abs(x1 - x2) + abs(y1 - y2)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected