ytm.utils.print_table#
- ytm.utils.print_table(id: str, rows: dict[str, dict], force_no_rich: bool = False) None#
Print a formatted table to the console.
Column headers are derived from all keys across all row dicts. Missing values are shown as
-. Usesrichif available, otherwise falls back to plain ASCII.- Parameters:
- idstr
Label for the top-left header cell (e.g. epoch identifier).
- rowsdict of str to dict
Mapping of row name to a dict of column values.
- force_no_richbool, default=False
If True, use plain ASCII output even if
richis installed.
Examples
>>> print_table("Epoch 1/10", { ... "Train": {"Acc": "95.00%", "Fit Time": "1.23s"}, ... "Test": {"Acc": "92.00%"}, ... })