⚡Quick Start
Test your installation with a quick demo.
Command Format
Check the run command options:
slm-lab run --helpUsage: slm-lab run [OPTIONS] [SPEC_FILE] [SPEC_NAME] [MODE]
Arguments:
spec_file JSON spec file path [default: slm_lab/spec/benchmark/ppo/ppo_cartpole.json]
spec_name Spec name within the file [default: ppo_cartpole]
mode Execution mode: dev|train|search|enjoy [default: dev]
Options:
--set, -s Set spec variables: KEY=VALUE (can be used multiple times)
--render Enable environment renderingThe full command format is:
slm-lab run spec.json spec_name modeSo slm-lab run is equivalent to:
slm-lab run slm_lab/spec/benchmark/ppo/ppo_cartpole.json ppo_cartpole devRun the Demo
This runs PPO on CartPole with visualization (single session, slower due to rendering). CartPole is a classic RL benchmark: balance a pole on a cart by moving left or right. The agent receives +1 reward per timestep the pole stays upright (max 500 per episode).
What to Expect
Terminal output:
Key metrics:
frame: Total environment steps processed
total_reward: Episode reward at this checkpoint
total_reward_ma: Moving average over 100 checkpoints (the primary success metric)
loss: Training loss (should decrease over time)
Rendering window:

Early in training, the pole falls quickly. As total_reward_ma climbs toward 400-500, you'll see the agent balance for longer periods.
Success Criteria
Random actions score ~20-30. PPO solves CartPole (450+ reward) within 50,000-100,000 frames.
Stopping the Demo
Press Ctrl+C to stop. In dev mode, partial results are not saved.
If you see rewards climbing, SLM Lab is working correctly. Continue to Train: PPO on CartPole for a full training run.
Troubleshooting: If you encounter errors, see Help for common issues and solutions.
Next Steps
Train: PPO on CartPole - Full training with saved results
Understanding Experiments - Sessions, Trials, and Experiments
Last updated
Was this helpful?