SLM-Lab  by kengz

Modular RL framework for agent training

Created 8 years ago
1,334 stars

Top 29.7% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

SLM Lab is a modular deep reinforcement learning (RL) framework in PyTorch, targeting researchers and engineers. It simplifies RL experimentation by offering ready-to-use algorithms, easy configuration via JSON, and robust reproducibility features. The framework aims to streamline research workflows and facilitate scalable training through cloud integrations.

How It Works

The framework's core is its modular design, enabling experiment definition solely through JSON spec files, eliminating code changes. Built on PyTorch and compatible with Gymnasium environments, it ensures reproducibility by automatically logging experiment specs and git SHAs. Integrated analysis tools provide training curves and TensorBoard logging, while dstack and HuggingFace support cloud-based training and results sharing.

Quick Start & Requirements

Installation uses uv: uv tool install --editable .. Run demos with slm-lab run (add --render for visualization). Custom experiments: slm-lab run spec.json spec_name train (local) or slm-lab run-remote spec.json spec_name train (cloud via dstack). Cloud setup requires copying .env.example to .env (for HuggingFace token) and installing dstack. For the "Foundations of Deep Reinforcement Learning" book, checkout v4.1.1. v5.0 updates dependencies.

Highlighted Details

  • Ready-to-use algorithms: PPO, SAC, DQN, A2C, REINFORCE, validated on 70+ environments.
  • JSON spec files for easy, code-free experiment configuration.
  • Guaranteed reproducibility via automatic logging of specs and git SHAs.
  • Out-of-the-box analysis: training curves, metrics, TensorBoard.
  • Cloud integration: dstack for GPU training, HuggingFace for sharing.

Maintenance & Community

The repository is hosted on GitHub. No specific details on active maintenance, contributors, or community channels (e.g., Discord, Slack) are provided in the README excerpt.

Licensing & Compatibility

Released under the MIT License, permitting broad use, including commercial applications and integration into closed-source projects.

Limitations & Caveats

Version 5.0 updates dependencies to Gymnasium and modern tooling, potentially requiring environment adjustments. Users referencing the companion book must checkout tag v4.1.1 to match its code examples.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
5
Issues (30d)
1
Star History
3 stars in the last 30 days

Explore Similar Projects

Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Cofounder of Luma AI), John Yang John Yang(Coauthor of SWE-bench, SWE-agent), and
6 more.

cleanrl by vwxyzjn

0.5%
9k
RL algorithms implementation with research-friendly features
Created 6 years ago
Updated 7 months ago
Feedback? Help us improve.