Spaces:
Running
Running
Mandark-droid
commited on
Commit
·
f0d23ea
1
Parent(s):
5828eb5
Fix TypeError: unhashable type 'list' - resolve variable name collision
Browse files- Fixed variable shadowing in on_test_case_select handler
- Local variable span_details_json was shadowing the component reference
- Renamed local variable to span_details_data to avoid collision
- Component keys must be hashable objects, not lists
- Fixes: TypeError: unhashable type: 'list' when returning from handler
app.py
CHANGED
|
@@ -206,7 +206,7 @@ def on_test_case_select(evt: gr.SelectData, df):
|
|
| 206 |
"Status": span.get('status', {}).get('code', 'UNKNOWN')
|
| 207 |
})
|
| 208 |
|
| 209 |
-
|
| 210 |
|
| 211 |
# Create thought graph
|
| 212 |
from components.thought_graph import create_thought_graph as create_network_graph
|
|
@@ -241,7 +241,7 @@ def on_test_case_select(evt: gr.SelectData, df):
|
|
| 241 |
trace_thought_graph: gr.update(value=thought_graph_plot),
|
| 242 |
span_visualization: gr.update(value=span_viz_plot),
|
| 243 |
span_details_table: gr.update(value=span_table_df),
|
| 244 |
-
span_details_json: gr.update(value=
|
| 245 |
gpu_summary_cards_html: gr.update(value=gpu_summary_html),
|
| 246 |
gpu_metrics_plot: gr.update(value=gpu_plot),
|
| 247 |
gpu_metrics_json: gr.update(value=gpu_json_data)
|
|
@@ -895,7 +895,7 @@ with gr.Blocks(title="TraceMind-AI", theme=theme) as app:
|
|
| 895 |
Agent Evaluation Platform
|
| 896 |
</p>
|
| 897 |
<p style="color: rgba(255,255,255,0.8); margin: 10px 0 0 0; font-size: 0.9em;">
|
| 898 |
-
Powered by Gradio 6 🚀 | HuggingFace Jobs | MCP
|
| 899 |
</p>
|
| 900 |
</div>
|
| 901 |
""")
|
|
|
|
| 206 |
"Status": span.get('status', {}).get('code', 'UNKNOWN')
|
| 207 |
})
|
| 208 |
|
| 209 |
+
span_details_data = simplified_spans
|
| 210 |
|
| 211 |
# Create thought graph
|
| 212 |
from components.thought_graph import create_thought_graph as create_network_graph
|
|
|
|
| 241 |
trace_thought_graph: gr.update(value=thought_graph_plot),
|
| 242 |
span_visualization: gr.update(value=span_viz_plot),
|
| 243 |
span_details_table: gr.update(value=span_table_df),
|
| 244 |
+
span_details_json: gr.update(value=span_details_data),
|
| 245 |
gpu_summary_cards_html: gr.update(value=gpu_summary_html),
|
| 246 |
gpu_metrics_plot: gr.update(value=gpu_plot),
|
| 247 |
gpu_metrics_json: gr.update(value=gpu_json_data)
|
|
|
|
| 895 |
Agent Evaluation Platform
|
| 896 |
</p>
|
| 897 |
<p style="color: rgba(255,255,255,0.8); margin: 10px 0 0 0; font-size: 0.9em;">
|
| 898 |
+
Powered by Gradio 6 🚀 | HuggingFace Jobs | TraceVerde | SmolTrace | MCP | Gemini | Modal
|
| 899 |
</p>
|
| 900 |
</div>
|
| 901 |
""")
|