nvalchemi.hooks.BaseRichLayout#

class nvalchemi.hooks.BaseRichLayout(*, name, preferred_plot_keys, latest_title, history_title, include_dynamics_scalars=False)[source]#

Reusable Rich dashboard layout for scalar tables and plot panels.

Parameters:
  • name (str)

  • preferred_plot_keys (Sequence[str])

  • latest_title (str)

  • history_title (str)

  • include_dynamics_scalars (bool)

name#

Short layout name displayed in the dashboard header.

Type:

str

include_dynamics_scalars#

Whether RichReporter should collect default dynamics observables when this layout is selected.

Type:

bool

default_preview_batch_count()[source]#

Return the batch metadata used by static dashboard previews.

Return type:

int | None

default_preview_epoch()[source]#

Return the epoch metadata used by static dashboard previews.

Return type:

int | None

default_preview_history()[source]#

Return synthetic metric curves for static dashboard previews.

Return type:

Mapping[str, Sequence[float]]

default_preview_stage()[source]#

Return the hook stage label used by static dashboard previews.

Return type:

str

render(snapshot, history, *, title, precision, max_scalars, plot_keys, max_plots, plot_height)[source]#

Build the Rich layout for one reporter snapshot.

Parameters:
  • snapshot (ScalarSnapshot | None) – Latest scalar snapshot, or None before the first report.

  • history (RichMetricHistory) – Retained scalar history keyed by metric name.

  • title (str) – Dashboard title.

  • precision (int) – Significant digits used for scalar values.

  • max_scalars (int | None) – Maximum number of latest scalar rows.

  • plot_keys (Sequence[str] | None) – Explicit plot key ordering override.

  • max_plots (int) – Maximum number of plot panels.

  • plot_height (int) – Plot height in terminal rows.

Returns:

Renderable Rich layout.

Return type:

Layout