Skip to content

Policy Inspector

Latest

Choose a tag to compare

@can2erol can2erol released this 24 Jun 02:22

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.

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-interval flag / inspect_interval_steps config knob to control snapshot
    cadence (0 = auto ≈ 50 snapshots/run, <0 = off).
  • New telemetry endpoint /api/runs/{id}/histogram_series serving the full (downsampled)
    histogram-over-time series.

Compatibility

  • No breaking changes. The inspector is on by default at a coarse cadence; pass
    --inspect-interval -1 to disable.

Install / upgrade: pip install -U rlens

Full changelog: v0.1.0...v0.2.0