TorchLean API

NN.Widgets.RL.Boundary

RL Boundary Rollout Viewer #

This widget is the “trust boundary debugger” for TorchLean RL.

It reads a Gymnasium-style rollout JSON file (typically produced by scripts/rl/export_gymnasium_rollout.py), validates every transition against a Lean-side Runtime.RL.Boundary.Contract, and renders a compact report:

This is intentionally separate from PPO-specific viewers: exported rollouts do not contain actor log-probabilities or value predictions, so PPO loss inspection belongs in the training examples.

def NN.Widgets.RL.Boundary.rolloutBoundaryReportHtml {obsShape : Spec.Shape} {nActions : } (path : System.FilePath) (c : Runtime.RL.Boundary.Contract obsShape nActions) (maxErrors : := 8) :

Render a small HTML report for a rollout JSON file under a given contract.

Instances For