-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvisualize.sh
More file actions
executable file
Β·41 lines (35 loc) Β· 1.62 KB
/
Copy pathvisualize.sh
File metadata and controls
executable file
Β·41 lines (35 loc) Β· 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Quick script to open evaluation dashboards
echo "π Opening Llama Stack Evaluation Dashboards..."
# Get the absolute path
DASHBOARD_DIR="evaluation_results/visualizations"
echo "π Available dashboards:"
echo " 1. Comprehensive Dashboard (main)"
echo " 2. Summary Charts"
echo " 3. Detailed Analysis"
echo " 4. Results Table"
echo ""
# Check if visualizations exist and are up-to-date, if not, generate them
LATEST_RESULTS=$(ls -t evaluation_results/evaluation_results_*.json 2>/dev/null | head -1)
if [ ! -f "$DASHBOARD_DIR/comprehensive_dashboard.html" ] || ([ -n "$LATEST_RESULTS" ] && [ "$LATEST_RESULTS" -nt "$DASHBOARD_DIR/comprehensive_dashboard.html" ]); then
if [ ! -f "$DASHBOARD_DIR/comprehensive_dashboard.html" ]; then
echo "π Visualizations not found. Generating them..."
else
echo "π Results file is newer than visualizations. Regenerating..."
fi
if [ -n "$LATEST_RESULTS" ]; then
echo "π Using results file: $LATEST_RESULTS"
uv run -m visualize "$LATEST_RESULTS" --type all
else
echo "β No results files found. Please run an evaluation first."
exit 1
fi
fi
echo "π Opening comprehensive dashboard..."
xdg-open "file://$DASHBOARD_DIR/comprehensive_dashboard.html" 2>/dev/null || \
firefox "file://$DASHBOARD_DIR/comprehensive_dashboard.html" 2>/dev/null || \
chromium-browser "file://$DASHBOARD_DIR/comprehensive_dashboard.html" 2>/dev/null || \
echo "β Could not open browser. Please manually open: $DASHBOARD_DIR/comprehensive_dashboard.html"
echo ""
echo "π All files located at: $DASHBOARD_DIR"
echo "β
Dashboard opened!"