← all repositories
alex-petrenko/sample-factory

Policy gradients at factory-floor throughput

It treats policy-gradient training as a systems optimization problem to cut hardware costs and waiting time.

1k stars Python ML FrameworksDomain Apps
sample-factory
Not currently ranked — collecting fresh signals.
star history

What it does Sample Factory is a Python library built around Proximal Policy Optimization, designed to keep GPUs and CPUs saturated during training. It offers both synchronous and asynchronous regimes to maximize learning throughput across environments ranging from Atari and MuJoCo to ViZDoom and IsaacGym. The library auto-generates model architectures from environment specs and supports multi-agent, self-play, and Population-Based Training as built-in features.

The interesting bit Most RL frameworks treat speed as a secondary concern; Sample Factory treats throughput as the core design constraint, optimizing the entire algorithm architecture around pipeline saturation. It even provides a serial single-process mode—seemingly paradoxical for a throughput-obsessed library—so you can debug the exact same code path before scaling up. That combination suggests the authors ship research code, not just publish it.

Key highlights

  • Synchronous and asynchronous training regimes for different hardware layouts
  • Automatic model architecture generation from action and observation space specs
  • First-class support for custom environments; meant to be imported into other projects
  • Multi-agent, self-play, and Population-Based Training across one or many GPUs
  • HuggingFace Hub integration for uploading models and metrics

Caveats

  • No Windows support; Linux and macOS only
  • The README is intentionally brief, so most configuration details live in the external documentation site

Verdict Researchers running large-scale PPO experiments or custom simulators on Linux will find the throughput focus and import-friendly design compelling. If you are on Windows, need a gentle on-ramp to RL, or want a minimal API, look elsewhere.

Frequently asked

What is alex-petrenko/sample-factory?
It treats policy-gradient training as a systems optimization problem to cut hardware costs and waiting time.
Is sample-factory open source?
Yes — alex-petrenko/sample-factory is open source, released under the MIT license.
What language is sample-factory written in?
alex-petrenko/sample-factory is primarily written in Python.
How popular is sample-factory?
alex-petrenko/sample-factory has 1k stars on GitHub.
Where can I find sample-factory?
alex-petrenko/sample-factory is on GitHub at https://github.com/alex-petrenko/sample-factory.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.