From d0832eb5ff4c8c866bd4a6aefaf95d9489d1d644 Mon Sep 17 00:00:00 2001 From: XianBW <36835909+XianBW@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:07:19 +0800 Subject: [PATCH] bug fix (#1145) --- rdagent/log/ui/ds_trace.py | 14 ++++++++++++-- rdagent/log/ui/utils.py | 6 +++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/rdagent/log/ui/ds_trace.py b/rdagent/log/ui/ds_trace.py index 4d137fb2..489ef117 100644 --- a/rdagent/log/ui/ds_trace.py +++ b/rdagent/log/ui/ds_trace.py @@ -639,14 +639,24 @@ def summarize_win(): ) timeout_stats = get_timeout_stats(state.llm_data) + coding_timeout_pct = ( + round(timeout_stats["coding"]["timeout"] / timeout_stats["coding"]["total"] * 100, 2) + if timeout_stats["coding"]["total"] > 0 + else 0 + ) info6.metric( "Timeouts (C)", - f"{round(timeout_stats['coding']['timeout'] / timeout_stats['coding']['total'] * 100, 2)}%", + f"{coding_timeout_pct}%", help=f"{timeout_stats['coding']['timeout']}/{timeout_stats['coding']['total']}", ) + running_timeout_pct = ( + round(timeout_stats["running"]["timeout"] / timeout_stats["running"]["total"] * 100, 2) + if timeout_stats["running"]["total"] > 0 + else 0 + ) info7.metric( "Timeouts (R)", - f"{round(timeout_stats['running']['timeout'] / timeout_stats['running']['total'] * 100, 2)}%", + f"{running_timeout_pct}%", help=f"{timeout_stats['running']['timeout']}/{timeout_stats['running']['total']}", ) diff --git a/rdagent/log/ui/utils.py b/rdagent/log/ui/utils.py index 9c66f66e..b0d4a08c 100644 --- a/rdagent/log/ui/utils.py +++ b/rdagent/log/ui/utils.py @@ -197,9 +197,9 @@ def get_sota_exp_stat( ] running_exps.sort(key=lambda x: x[1], reverse=True) for exp, loop_id in running_exps: - if exp.experiment_workspace.all_codes == sota_exp.experiment_workspace.all_codes and str(exp.hypothesis) == str( - sota_exp.hypothesis - ): + if exp.experiment_workspace.all_codes == sota_exp.experiment_workspace.all_codes and "".join( + str(i) for i in exp.hypothesis.__dict__.values() + ) == "".join(str(i) for i in sota_exp.hypothesis.__dict__.values()): sota_loop_id = loop_id break