kd.kdash.DashboardsBase

kd.kdash.DashboardsBase#

class kauldron.utils.kdash.DashboardsBase[source]

Bases: abc.ABC

Flatboard dashboard structure.

Flatboard dashboards have the following structure:

  • Dashboard (e.g. metrics, schedules) * Plot (e.g. Accuracy, CrossEntropy,…)

    • Query (i.e. collections, like train, eval)

However for convenience, it’s sometimes easier to define the structure the other way around (collection -> plot -> metric, or collection -> metric -> plot). The DashboardsBase abstraction allow to define partial dashboards in arbitrary ways and merge them later on.

There’s 4 main dashboard abstractions:

  • SingleDashboard: Simple dashboard (with multiple plots).

  • MultiDashboards: Container of multiple dashboards.

  • MetricDashboards: Standard dashboards for the metrics, losses.

  • NoopDashboard: Empty dashboard.

Usage:

dashboards = kdash.MultiDashboards.from_iterable([
    kdash.MetricDashboards(
        collection='train',
        losses={'xent': None},
        metrics={'accuracy': TopKAccuracy, 'psnr': None},
    ),
    kdash.MetricDashboards(
        collection='eval',
        losses={'xent': None},
        metrics={
          'accuracy': TopKAccuracy,
          'precision_recall': PrecisionRecallMetric
        },
    ),
])

kdash.build_and_upload(dashboards)
abstractmethod normalize() kauldron.utils.kdash.dashboard_utils.MultiDashboards[source]

Returns a normalized version of the dashboard.