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

Method save_metrics_all

AgentBench.old/src/task.py:168–173  ·  view source on GitHub ↗
(self, metrics: Dict[str, Any])

Source from the content-addressed store, hash-verified

166 self.save_metrics_all(metrics)
167
168 def save_metrics_all(self, metrics: Dict[str, Any]):
169 if not os.path.exists(self.get_output_dir()):
170 try: os.makedirs(self.get_output_dir())
171 except: pass
172 with open(os.path.join(self.get_output_dir(), "results.json"), "w", encoding="utf-8") as f:
173 f.write(json.dumps(metrics, ensure_ascii=False, indent=4))
174
175 def get_output_dir(self) -> str:
176 """

Callers 2

save_runs_allMethod · 0.95
evaluateMethod · 0.80

Calls 3

get_output_dirMethod · 0.95
joinMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected