TorchLean API

NN.Examples.RL.GymnasiumRolloutView

Gymnasium Rollout Boundary Viewer #

This is the “first thing to open” when an external Gymnasium rollout looks wrong.

Workflow:

  1. Export a rollout in Python:
python3 -m pip install --user 'gymnasium>=1.0'
python3 scripts/rl/export_gymnasium_rollout.py --env-id CartPole-v1 --steps 256 --seed 0 \
  --out data/rl/gym_cartpole_rollout.json
  1. Open this file in an editor and put the cursor on the #rl_boundary_rollout_file_view command.

The widget validates every transition against the contract and summarizes any violations. This is the trust boundary that sits between untrusted Python environments and Lean-side PPO code.