Skip to content

Commit e73b1cc

Browse files
committed
fix penalty parse error
1 parent c711964 commit e73b1cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

analyze_agentlab_results/summarize_study.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,10 @@ def read_penalties_data(subdir):
181181
with open(penalties_path, "r") as f:
182182
reader = csv.DictReader(f)
183183
for row in reader:
184-
penalty_data["penalty"] = float(row.get("penalty", 0))
184+
penalty_value = row.get("penalty", 0)
185+
penalty_data["penalty"] = (
186+
float(penalty_value) if penalty_value not in ["None"] else 0.0
187+
)
185188
wrong_solutions_str = row.get("wrong_solutions", "")
186189
if wrong_solutions_str:
187190
penalty_data["wrong_solutions"] = wrong_solutions_str.split("|")

0 commit comments

Comments
 (0)