Commit
·
b1920b3
1
Parent(s):
f35243c
Update plot labels and UI improvements (v0.3.19)
Browse files- Make Calculated with routing accordion expanded by default
- Improve plot labels to be more descriptive
- Remove redundant title from token type cost chart
app.py
CHANGED
|
@@ -742,7 +742,7 @@ def create_cost_by_type_chart(df: pd.DataFrame, input_price: float, cache_read_p
|
|
| 742 |
cost_data,
|
| 743 |
x="Token Type",
|
| 744 |
y="Cost ($)",
|
| 745 |
-
title="
|
| 746 |
color="Token Type",
|
| 747 |
color_discrete_sequence=["#EF553B", "#19D3F3", "#FFA15A", "#AB63FA"],
|
| 748 |
)
|
|
@@ -1341,35 +1341,35 @@ def build_app():
|
|
| 1341 |
|
| 1342 |
with gr.Accordion("Leaderboard data", open=True):
|
| 1343 |
with gr.Row():
|
| 1344 |
-
plot_steps = gr.Plot(label="API Calls
|
| 1345 |
-
plot_cost = gr.Plot(label="Cost
|
| 1346 |
|
| 1347 |
with gr.Accordion("Metadata from .traj", open=True):
|
| 1348 |
with gr.Row():
|
| 1349 |
-
plot_tokens_meta = gr.Plot(label="
|
| 1350 |
-
plot_tokens_cost_meta = gr.Plot(label="Cost by Token Type")
|
| 1351 |
|
| 1352 |
with gr.Accordion("Metadata from .traj by trajectory", open=False):
|
| 1353 |
with gr.Row():
|
| 1354 |
-
plot_stacked_meta = gr.Plot(label="Tokens per Trajectory")
|
| 1355 |
with gr.Row():
|
| 1356 |
plot_cost_breakdown_meta = gr.Plot(label="Cost per Trajectory")
|
| 1357 |
|
| 1358 |
with gr.Accordion("Calculated from .traj messages", open=True):
|
| 1359 |
with gr.Row():
|
| 1360 |
-
plot_tokens_calc = gr.Plot(label="
|
| 1361 |
-
plot_tokens_cost_calc = gr.Plot(label="Cost by Token Type")
|
| 1362 |
|
| 1363 |
with gr.Accordion("Calculated from .traj messages by trajectory", open=False):
|
| 1364 |
with gr.Row():
|
| 1365 |
-
plot_stacked_calc = gr.Plot(label="Tokens per Trajectory")
|
| 1366 |
with gr.Row():
|
| 1367 |
plot_cost_breakdown_calc = gr.Plot(label="Cost per Trajectory")
|
| 1368 |
|
| 1369 |
with gr.Accordion("Calculated with routing", open=True, visible=False) as routing_plots_row:
|
| 1370 |
with gr.Row():
|
| 1371 |
routing_tokens_plot = gr.Plot(label="Tokens by Type (per Model)")
|
| 1372 |
-
routing_cost_plot = gr.Plot(label="Cost by Type (per Model)")
|
| 1373 |
|
| 1374 |
with gr.Column(scale=1):
|
| 1375 |
selected_folder = gr.State("")
|
|
|
|
| 742 |
cost_data,
|
| 743 |
x="Token Type",
|
| 744 |
y="Cost ($)",
|
| 745 |
+
title="",
|
| 746 |
color="Token Type",
|
| 747 |
color_discrete_sequence=["#EF553B", "#19D3F3", "#FFA15A", "#AB63FA"],
|
| 748 |
)
|
|
|
|
| 1341 |
|
| 1342 |
with gr.Accordion("Leaderboard data", open=True):
|
| 1343 |
with gr.Row():
|
| 1344 |
+
plot_steps = gr.Plot(label="Distribution of API Calls (Steps) per Trajectory")
|
| 1345 |
+
plot_cost = gr.Plot(label="Distribution of Cost Reported by Leaderboard ($)")
|
| 1346 |
|
| 1347 |
with gr.Accordion("Metadata from .traj", open=True):
|
| 1348 |
with gr.Row():
|
| 1349 |
+
plot_tokens_meta = gr.Plot(label="Total Tokens by Type")
|
| 1350 |
+
plot_tokens_cost_meta = gr.Plot(label="Total Cost by Token Type ($)")
|
| 1351 |
|
| 1352 |
with gr.Accordion("Metadata from .traj by trajectory", open=False):
|
| 1353 |
with gr.Row():
|
| 1354 |
+
plot_stacked_meta = gr.Plot(label="Tokens per Trajectory (stacked)")
|
| 1355 |
with gr.Row():
|
| 1356 |
plot_cost_breakdown_meta = gr.Plot(label="Cost per Trajectory")
|
| 1357 |
|
| 1358 |
with gr.Accordion("Calculated from .traj messages", open=True):
|
| 1359 |
with gr.Row():
|
| 1360 |
+
plot_tokens_calc = gr.Plot(label="Total Tokens by Type")
|
| 1361 |
+
plot_tokens_cost_calc = gr.Plot(label="Total Cost by Token Type ($)")
|
| 1362 |
|
| 1363 |
with gr.Accordion("Calculated from .traj messages by trajectory", open=False):
|
| 1364 |
with gr.Row():
|
| 1365 |
+
plot_stacked_calc = gr.Plot(label="Tokens per Trajectory (stacked)")
|
| 1366 |
with gr.Row():
|
| 1367 |
plot_cost_breakdown_calc = gr.Plot(label="Cost per Trajectory")
|
| 1368 |
|
| 1369 |
with gr.Accordion("Calculated with routing", open=True, visible=False) as routing_plots_row:
|
| 1370 |
with gr.Row():
|
| 1371 |
routing_tokens_plot = gr.Plot(label="Tokens by Type (per Model)")
|
| 1372 |
+
routing_cost_plot = gr.Plot(label="Cost by Type (per Model) ($)")
|
| 1373 |
|
| 1374 |
with gr.Column(scale=1):
|
| 1375 |
selected_folder = gr.State("")
|