pufferlib
Former des agents d'apprentissage par renforcement rapidement
Auch verfügbar von: davila7
La formation d'agents RL nécessite des environnements parallèles haute performance et des algorithmes efficaces. PufferLib fournit une formation PPO+LSTM optimisée avec des accélérations de 2 à 10x grâce à la vectorisation, les tampons mémoire partagés et le support multi-agents.
Die Skill-ZIP herunterladen
In Claude hochladen
Gehe zu Einstellungen → Fähigkeiten → Skills → Skill hochladen
Einschalten und loslegen
Teste es
Verwendung von "pufferlib". Train PPO on CartPole with pufferlib
Erwartetes Ergebnis:
- Environment: gym-CartPole-v1 with 256 parallel envs
- Policy: 2-layer MLP (256 hidden units) with layer_init
- Training: 10,000 iterations, batch size 32768
- Checkpoint: Saved to checkpoints/checkpoint_1000.pt
- Final throughput: 1.2M steps/second on GPU
Verwendung von "pufferlib". Create multi-agent environment
Erwartetes Ergebnis:
- Multi-agent setup: 4 agents in cooperative navigation task
- Observation space: Dict with position, goal, and other agent positions
- Action space: 5 discrete actions (4 directions + stay)
- Shared policy backbone for efficient learning
- Training with PuffeRL at 800K steps/second
Sicherheitsaudit
SicherAll 331 static findings are FALSE POSITIVES. This is a legitimate open-source reinforcement learning library. The static analyzer incorrectly flagged bash command examples in markdown documentation (SKILL.md, references/*.md) as dangerous backtick execution. No actual command injection, credential exfiltration, or malicious patterns exist in the codebase. Verified via grep - no hashlib, subprocess, or actual dangerous execution patterns found.
Risikofaktoren
Qualitätsbewertung
Was du bauen kannst
Benchmarking rapide
Benchmark rapidement de nouveaux algorithmes sur les environnements Ocean avec un débit de millions de pas par seconde
Formation d'environnements de jeu
Formez des agents sur Atari, Procgen ou NetHack avec une vectorisation optimisée et un PPO efficace
Équipes d'agents coopératifs
Construisez et entraînez des systèmes multi-agents avec l'intégration PettingZoo et les options de politique partagée
Probiere diese Prompts
Use pufferlib to train a PPO agent on the procgen-coinrun environment with 256 parallel envs. Show the training loop and how to save checkpoints.
Help me create a custom PufferEnv for a grid world task with 4 discrete actions. Show the reset, step, and observation space definitions.
Use pufferlib to train multiple agents on a PettingZoo environment. Show how to handle dict observations and shared policies.
Optimize my pufferlib training setup for maximum throughput. What vectorization settings and hyperparameters should I use for 4 GPUs?
Bewährte Verfahren
- Commencez par les environnements Ocean ou l'intégration Gymnasium avant de construire des environnements personnalisés
- Profilmez les pas par seconde tôt pour identifier les goulots d'étranglement avant la mise à l'échelle
- Utilisez torch.compile et CUDA pour un débit de formation maximal
Vermeiden
- Évitez d'utiliser le CPU pour la formation à grande échelle - utilisez le GPU avec suffisamment de VRAM
- Ne sautez pas la validation des environnements avant la mise à l'échelle vers de nombreux environnements parallèles
- Évitez de coder en dur les hyperparamètres - utilisez les arguments CLI pour la reproductibilité
Häufig gestellte Fragen
Quels environnements pufferlib supporte-t-il ?
Quelle est la vitesse de pufferlib par rapport aux implémentations standard ?
Puis-je utiliser pufferlib avec des environnements personnalisés ?
Pufferlib supporte-t-il la formation multi-GPU ?
Quels frameworks de journalisation s'intègrent avec pufferlib ?
Comment sauvegarder et reprendre la formation ?
Entwicklerdetails
Autor
K-Dense-AILizenz
MIT license
Repository
https://github.com/K-Dense-AI/claude-scientific-skills/tree/main/scientific-skills/pufferlibRef
main
Dateistruktur