xnn.common.benchmark.report#
Tabulate benchmark results and write them in user-selectable formats.
A benchmark result is a table: a list of row dicts sharing a common set of
columns (model and split first, then one column per target_metric).
columns() derives the ordered column list from the rows.
Writers follow the same name -> callable registry pattern as the model and
metric registries, so new output formats – including user-defined ones – are
added without touching the core. The built-ins are csv, json and
md (GitHub-flavored Markdown). write() dispatches one format;
write_all() writes several and returns the paths. format_table()
renders the same rows as an aligned plain-text table for stdout.
Functions
|
Relabel row keys with their units, for unit-annotated file output. |
List the names of all registered results writers. |
|
|
Derive the ordered column list spanning all result rows. |
|
Render results as an aligned monospaced table for printing. |
|
Return a decorator registering a results writer under |
|
Write results in a single registered format. |
|
Write results to every requested format under one directory. |
|
Write rows as CSV with a header line. |
|
Write rows as a JSON array of objects (column order preserved). |
|
Write rows as a GitHub-flavored Markdown table. |