MCPcopy Create free account
hub / github.com/dbt-labs/ade-bench / format_summary_table

Function format_summary_table

scripts_python/summarize_results.py:164–209  ·  view source on GitHub ↗

Format the summary data into a table format for display.

(summary: Dict[str, Any])

Source from the content-addressed store, hash-verified

162
163
164def format_summary_table(summary: Dict[str, Any]) -> List[List[str]]:
165 """Format the summary data into a table format for display."""
166 table_data = []
167
168 # Add task rows
169 for task in summary["tasks"]:
170 table_data.append(
171 [
172 task["task_id"],
173 task["result"],
174 task["failure_type"],
175 task["tests"],
176 task["passed"],
177 task["passed_percentage"],
178 task["time_seconds"],
179 task["cost"],
180 task["input_tokens"],
181 task["output_tokens"],
182 task["cache_tokens"],
183 task["turns"],
184 ]
185 )
186
187 # Add blank row as divider
188 table_data.append([""] * len(summary["headers"]))
189
190 # Add total row
191 total_row = summary["total_row"]
192 table_data.append(
193 [
194 total_row["task_id"],
195 total_row["result"],
196 total_row["failure_type"],
197 total_row["tests"],
198 total_row["passed"],
199 total_row["passed_percentage"],
200 total_row["time_seconds"],
201 total_row["cost"],
202 total_row["input_tokens"],
203 total_row["output_tokens"],
204 total_row["cache_tokens"],
205 total_row["turns"],
206 ]
207 )
208
209 return table_data
210
211
212def generate_html_table(results: BenchmarkResults, experiment_dir: Optional[Path] = None) -> str:

Callers 1

display_detailed_resultsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected