MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / average_round

Method average_round

AgentBench.old/src/tasks/dbbench/__init__.py:226–234  ·  view source on GitHub ↗
(inp: List[Dict[str, Any]], tar: List[str])

Source from the content-addressed store, hash-verified

224 for typ in ("SELECT", "INSERT", "UPDATE")]) / 3
225
226 def average_round(inp: List[Dict[str, Any]], tar: List[str]) -> float:
227 count = 0
228 total = 0
229 for entry, cor in zip(inp, tar):
230 if not entry:
231 continue
232 count += len(entry["history"])
233 total += 1
234 return count / total if total else 0, total
235
236 ret["average_round"] = average_round
237

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected