kengz/SLM-Lab
Modular Deep Reinforcement Learning framework in PyTorch. Companion library of the book "Foundations of Deep Reinforcement Learning".
What it solves
SLM Lab provides a modular framework for Deep Reinforcement Learning (DRL) research and application. It eliminates the need to write repetitive boilerplate code for every experiment by offering a standardized way to configure, run, and analyze RL agents across various environments.
How it works
The framework is built on PyTorch and integrates with Gymnasium (the maintained fork of OpenAI Gym). Users define their experiments using JSON specification files, which allow them to swap algorithms, hyperparameters, and environments without changing the underlying code. It supports both local training and remote cloud GPU training via dstack, with results automatically synced to HuggingFace.
Who it’s for
It is designed for RL researchers, students (specifically those reading the companion book Foundations of Deep Reinforcement Learning), and developers looking to implement and validate RL algorithms on standard benchmarks.
Highlights
- Broad Algorithm Support: Includes validated implementations of PPO, SAC, DQN, A2C, REINFORCE, and CrossQ.
- Configuration-Driven: Experiments are fully defined via JSON specs for high reproducibility.
- Environment Flexibility: Compatible with any Gymnasium environment, including Classic Control, Box2D, MuJoCo, and Atari.
- Cloud Integration: Built-in support for dstack for GPU training and HuggingFace for result sharing.
- Automatic Analysis: Integrated TensorBoard logging and training curve generation.
Related
- Project
- Project
- Project
- Project
- Project