Skip to content

Commit 3c881fe

Browse files
authored
bug fix (#1145)
1 parent 44fd2ee commit 3c881fe

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

rdagent/log/ui/ds_trace.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,14 +639,24 @@ def summarize_win():
639639
)
640640

641641
timeout_stats = get_timeout_stats(state.llm_data)
642+
coding_timeout_pct = (
643+
round(timeout_stats["coding"]["timeout"] / timeout_stats["coding"]["total"] * 100, 2)
644+
if timeout_stats["coding"]["total"] > 0
645+
else 0
646+
)
642647
info6.metric(
643648
"Timeouts (C)",
644-
f"{round(timeout_stats['coding']['timeout'] / timeout_stats['coding']['total'] * 100, 2)}%",
649+
f"{coding_timeout_pct}%",
645650
help=f"{timeout_stats['coding']['timeout']}/{timeout_stats['coding']['total']}",
646651
)
652+
running_timeout_pct = (
653+
round(timeout_stats["running"]["timeout"] / timeout_stats["running"]["total"] * 100, 2)
654+
if timeout_stats["running"]["total"] > 0
655+
else 0
656+
)
647657
info7.metric(
648658
"Timeouts (R)",
649-
f"{round(timeout_stats['running']['timeout'] / timeout_stats['running']['total'] * 100, 2)}%",
659+
f"{running_timeout_pct}%",
650660
help=f"{timeout_stats['running']['timeout']}/{timeout_stats['running']['total']}",
651661
)
652662

rdagent/log/ui/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ def get_sota_exp_stat(
197197
]
198198
running_exps.sort(key=lambda x: x[1], reverse=True)
199199
for exp, loop_id in running_exps:
200-
if exp.experiment_workspace.all_codes == sota_exp.experiment_workspace.all_codes and str(exp.hypothesis) == str(
201-
sota_exp.hypothesis
202-
):
200+
if exp.experiment_workspace.all_codes == sota_exp.experiment_workspace.all_codes and "".join(
201+
str(i) for i in exp.hypothesis.__dict__.values()
202+
) == "".join(str(i) for i in sota_exp.hypothesis.__dict__.values()):
203203
sota_loop_id = loop_id
204204
break
205205

0 commit comments

Comments
 (0)