rl-baselines3-zoo
Operate RL Baselines3 Zoo package and CLI workflows for Stable-Baselines3 reinforcement-learning experiments.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- rl-baselines3-zoo
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Operate RL Baselines3 Zoo package and CLI workflows for Stable-Baselines3 reinforcement-learning experiments.
- disable-model-invocation
- true
02 资源文件 7
- 参考文档references/cli-command-map.md3.9 KB
- 参考文档references/install-and-environment.md5.2 KB
- 参考文档references/repo-provenance.md2.4 KB
- 参考文档references/repo-routing-metadata.json494 B
- 参考文档references/troubleshooting.md5.0 KB
- 脚本scripts/build_rl_zoo3_command.py4.2 KB
- 脚本scripts/check_rl_zoo3_install.py4.9 KB
03 SKILL.md 正文
RL Baselines3 Zoo
Use this repo skill when the task involves RL Baselines3 Zoo / rl_zoo3: training Stable-Baselines3 or SB3-Contrib agents from Zoo hyperparameter files, evaluating saved agents, tuning with Optuna, using Gymnasium env IDs and wrappers/callbacks, plotting Zoo logs, or managing Hub/W&B/video integrations.
Start here
- Confirm the package and command surface with install and environment guidance.
- Use CLI command map to choose the correct command family.
- If an error occurs before a workflow is clear, use cross-cutting troubleshooting.
- If working against a checkout or a newer package version, compare against repository provenance.
- Use router metadata only for managed repo-skill routing context.
Minimal package checks
python - <<'PY'
import rl_zoo3
print(rl_zoo3.__version__)
print(sorted(rl_zoo3.ALGOS))
PY
python -m rl_zoo3.train --help
python -m rl_zoo3.enjoy --help
For a bundled, non-mutating check:
python scripts/check_rl_zoo3_install.py --check-plots
Route by task
| User task | Read |
|---|---|
Build, run, resume, or debug a training command; choose --algo, --env, --log-folder, eval/checkpoint/replay flags, device, --gym-packages, or W&B route flags |
training-cli |
Read, write, or validate RL Zoo YAML/Python hyperparameter configs, default/atari entries, normalize, wrappers/callback config, --conf-file, or --hyperparams quoting |
config-hyperparams |
Run or diagnose Optuna HPO: -optimize, samplers/pruners, storage/study reuse, --trial-id, distributed workers, HPO report artifacts |
tuning-optimization |
Load/evaluate an existing local model with enjoy, choose final/best/checkpoint/latest, inspect log/model folders, use no-render evaluation, or plan local benchmark smoke checks |
evaluation-and-artifacts |
| Register custom Gymnasium envs, validate wrapper/callback/policy import strings, use built-in wrappers/callbacks, patch custom algorithms/SBX | custom-components |
Plan Hugging Face Hub download/upload/model-card commands, W&B tracking, record_video, record_training, display/ffmpeg/gif requirements |
integrations-hub-tracking |
Plot monitor/evaluation curves, build all_plots / plot_from_file commands, run bounded benchmark output flows, troubleshoot rliable/plot deps |
plotting-benchmarking |
Command stance
- Prefer installed-package module commands for train/evaluate:
python -m rl_zoo3.train --algo ppo --env CartPole-v1 --n-timesteps 1000 python -m rl_zoo3.enjoy --algo ppo --env CartPole-v1 -f logs --exp-id 0 --no-render - Use
rl_zoo3 train/rl_zoo3 enjoyonly when the console router imports cleanly. The console router imports plotting modules, so base installs can fail unless plot dependencies are installed. - Use helper scripts in this skill to build commands, check imports, inspect local layouts, or validate config/component shapes. They do not train, upload, download, render, or call live services unless the helper explicitly says it only reads local files.
Bundled root scripts
- scripts/check_rl_zoo3_install.py: import/version/optional plotting/CUDA probe; safe and non-mutating.
- scripts/build_rl_zoo3_command.py: quick command router that prints an installed-package command and the owning sub-skill. Use sub-skill helpers for deeper validation.
Example:
python scripts/build_rl_zoo3_command.py train -- --algo ppo --env CartPole-v1 --n-timesteps 1000
Optional dependencies and backends
- CPU is enough for CartPole/Pendulum smoke workflows, static config validation, command construction, local artifact inspection, and most troubleshooting.
- Optional simulator families (Atari, MuJoCo, Box2D, PyBullet, highway, Minigrid, robotics, custom envs) require their own packages and sometimes data/ROMs.
- CUDA or another accelerator is optional unless the user specifically asks for accelerator training. Validate PyTorch device availability before using
--device cudain a long run. - Hub, W&B, video, and plot workflows may require network, credentials, display/offscreen rendering,
ffmpeg, or plot extras; route to the owning sub-skill first.
Do not use this skill for
- Raw Stable-Baselines3 algorithm API questions that do not involve RL Zoo commands, hyperparams, artifact layout, or scripts.
- Generic Gymnasium environment authoring unless the env must be registered/used through RL Zoo.
- LLM RLHF/post-training workflows unrelated to Gymnasium/SB3 agents.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).