Policy Inspector
rlens now shows what your network is doing, not just its loss curve.
The new policy inspector renders per-layer weight and gradient distributions over
training as a heatmap (x = step, y = value, colour = density) — watch weights spread or
saturate and gradients collapse, layer by layer. It's the introspection W&B/TensorBoard
make you wire up by hand, available with zero setup in the local dashboard.
What's new
- Policy inspector in the dashboard — per-layer weight/gradient distribution heatmaps,
with a layer selector, placed under the reward chart. - Distribution capture is Trainer-owned and uniform across PPO/DQN/SAC — no per-algorithm
code. Weights and gradients are sampled (capped per tensor) and logged as histograms over
training; gradient norms (grad_norm/*scalars) are still there too. --inspect-intervalflag /inspect_interval_stepsconfig knob to control snapshot
cadence (0= auto ≈ 50 snapshots/run,<0= off).- New telemetry endpoint
/api/runs/{id}/histogram_seriesserving the full (downsampled)
histogram-over-time series.
Compatibility
- No breaking changes. The inspector is on by default at a coarse cadence; pass
--inspect-interval -1to disable.
Install / upgrade: pip install -U rlens
Full changelog: v0.1.0...v0.2.0
