From 6fdf63370f504a9d58abd06f06999e57ce4b0ae2 Mon Sep 17 00:00:00 2001 From: you-n-g Date: Thu, 10 Jul 2025 12:35:03 +0800 Subject: [PATCH] feat: add only success filter toggle for traces (#1047) --- rdagent/log/ui/ds_trace.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rdagent/log/ui/ds_trace.py b/rdagent/log/ui/ds_trace.py index 36326ede..071daf27 100644 --- a/rdagent/log/ui/ds_trace.py +++ b/rdagent/log/ui/ds_trace.py @@ -475,6 +475,7 @@ def summarize_win(): min_id, max_id = get_state_data_range(state.data) info0, info1, info2, info3, info4, info5 = st.columns([1, 1, 1, 1, 1, 1]) show_trace_dag = info0.toggle("Show trace DAG", key="show_trace_dag") + only_success = info0.toggle("Only Success", key="only_success") with info1.popover("LITELLM", icon="⚙️"): st.write(state.data.get("settings", {}).get("LITELLM_SETTINGS", "No settings found.")) with info2.popover("RD_AGENT", icon="⚙️"): @@ -613,6 +614,8 @@ def summarize_win(): fig.data[1].name = "Cumulative COST($)" st.plotly_chart(fig) + if only_success: + df = df[df["Feedback"] == "✅"] st.dataframe(df[df.columns[~df.columns.isin(["Hypothesis", "Reason", "Others"])]]) # scores curve