TorchLean API

NN.Widgets.Runtime.Training

Training #

Training/testing loop visualizations (logs, curves, and small reports).

TorchLean’s core runtime and specs are purely mathematical; "training loops" are just repeated application of an update rule. In practice, the first thing you want when debugging training is:

This module provides a pure log viewer (no JS): inline SVG sparklines + HTML tables.

Main command:

Optional testing command:

Main definitions #

Implementation notes #

References #

Tags #

training, logs, metrics, confusion-matrix, proofwidgets

Curves #

Render a TrainLog (metric series + recent steps) as an infoview HTML panel.

Instances For

    Confusion Matrix #

    Render a ConfusionMatrix (with optional label clipping) as an infoview HTML panel.

    Instances For

      Commands #

      Render a Runtime.Training.TrainLog value directly in the infoview.

      This is the in-memory (non-IO) variant. For executables that write JSON logs to disk, see #train_log_file_view.

      Instances For

        TrainLog is pure data, but many executables write logs to disk.

        This command reads a saved JSON log (written by Runtime.Training.TrainLog.writeJson) and renders it using the same viewer as #train_log_view.

        Read a saved Runtime.Training.TrainLog JSON file and render it in the infoview.

        The expected JSON schema is the one produced by Runtime.Training.TrainLog.writeJson and TorchLean's executable training examples (for example PPO examples under NN/Examples/Models/*).

        When the file is missing or malformed, this command renders an error panel instead of failing the build, so widget-view files stay safe to import.

        Instances For

          Render a confusion matrix report in the infoview.

          This is a small viewer for Runtime.Training.ConfusionMatrix plus an aligned array of class labels.

          Instances For