L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Productivité · SKILL.md

stable-baselines3

stable-baselines3

Use Stable-Baselines3 for PyTorch reinforcement learning: train algorithms, validate Gymnasium environments, vectorize envs, customize policies, evaluate callbacks, and save/load SB3 models.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: stable-baselines3 description: "Use Stable-Baselines3 for PyTorch reinforcement learning: train algorithms, validate Gymnasium environments, vectorize envs, customize policies, evaluate callbacks, and save/load SB3 models." disable-model-invocation: true metadata: disco-role: operating license: MIT

Stable-Baselines3

Use this skill when a task involves Stable-Baselines3 (SB3), the PyTorch reinforcement-learning library with sklearn-like RL algorithms for Gymnasium environments.

Install and Import Check

Stable-Baselines3 requires Python 3.10+ and PyTorch. For normal use:

pip install stable-baselines3
python - <<'PY'
import stable_baselines3 as sb3
print(sb3.__version__)
print(sb3.__all__)
PY

Use pip install 'stable-baselines3[extra]' only when the task needs optional rendering, TensorBoard/progress bars, Atari, plotting, or result-loading extras.

For a quick public API diagnostic, run scripts/sb3_doctor.py with --help first.

Route by Task

  • Choose or train an algorithm: use training-and-algorithms for A2C/PPO/DQN/SAC/TD3/DDPG selection, constructor parameters, learn(), action-space compatibility, and tiny smoke training.
  • Build, validate, or vectorize environments: use environments-and-vectorization for Gymnasium custom env APIs, check_env, make_vec_env, DummyVecEnv, SubprocVecEnv, Monitor, VecNormalize, and VecEnv API differences.
  • Evaluate, log, checkpoint, or load models: use evaluation-and-persistence for evaluate_policy, callbacks, TensorBoard/logger behavior, save(), load(), replay buffers, VecNormalize, and portability debugging.
  • Customize policies and exploration: use policies-and-customization for policy_kwargs, custom feature extractors, MultiInputPolicy, action noise, gSDE, and HerReplayBuffer.

Common Starting Points

  • For a first CartPole-style training script, route to training-and-algorithms and use its scripts/train_smoke.py as a safe pattern.
  • For custom Gymnasium env failures, route to environments-and-vectorization before changing the RL algorithm.
  • For model portability or pickle/load errors, route to evaluation-and-persistence and use print_system_info=True guidance.
  • For Dict observations, first validate spaces in environments-and-vectorization, then design MultiInputPolicy details in policies-and-customization.

Shared References

Boundaries

This is a runtime user skill, not a maintainer release guide. It does not cover Docker image building, CI workflows, website generation, release publishing, or long benchmark training. If a task requires SB3 Contrib, RL Baselines3 Zoo, or SBX, treat those as adjacent projects and do not assume their APIs are included here.

Skills enregistrées