Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Fix "attempted" metric being incorrect (#251)

merwanehamadi34814d837abe
diff --git a/agbenchmark/reports/reports.py b/agbenchmark/reports/reports.py
index 7dddfc01a8..4891aa3ed8 100644
--- a/agbenchmark/reports/reports.py
+++ b/agbenchmark/reports/reports.py
@@ -239,7 +239,13 @@ def finalize_reports(item: Any, challenge_data: dict[str, Any]) -> None:
cost = get_data_from_helicone(test_name)
else:
print("Helicone not setup or mock flag set, not getting cost")
+
info_details["metrics"]["cost"] = cost
+
+ if info_details["metrics"].get("success", None) is None:
+ info_details["metrics"]["attempted"] = False
+ info_details["metrics"]["success"] = False
+
info_details["metrics"]["run_time"] = f"{str(round(run_time, 3))} seconds"
info_details["reached_cutoff"] = float(run_time) > challenge_data["cutoff"]
@@ -259,7 +265,6 @@ def generate_separate_suite_reports(suite_reports: dict) -> None:
"percentage": 0,
"highest_difficulty": "",
"run_time": "0 seconds",
- "attempted": True,
},
"tests": {},
}