← all repositories
PKU-Alignment/omnisafe

Standardized guardrails for reinforcement learning research

OmniSafe exists to give safe reinforcement learning algorithms a common, modular benchmark so researchers can stop reinventing the evaluation wheel.

1.1k stars Python ML FrameworksDomain Apps
omnisafe
Not currently ranked — collecting fresh signals.
star history

What it does

OmniSafe is a PyTorch-based framework that collects tens of safe reinforcement learning algorithms—on-policy, off-policy, model-based, and offline—into a single modular toolkit. It wraps them in a consistent API using Adapter and Wrapper patterns, aiming to standardize how researchers train, benchmark, and compare methods that minimize unsafe behavior. The project also provides parallel training acceleration via torch.distributed and bundles utilities for analysis and rendering.

The interesting bit

It claims to be the first unified framework specifically built for safe RL, covering everything from Lagrangian PPO variants to constrained cross-entropy methods and offline approaches like COptiDICE. That breadth is unusual; most RL libraries treat safety as an afterthought.

Key highlights

  • Implements tens of algorithms across on-policy, off-policy, model-based, and offline safe RL, with clear checkmarks showing which papers are currently covered
  • Uses torch.distributed for both environment-level and agent-level asynchronous parallelism
  • Modular design via Adapter/Wrapper patterns intended to let researchers swap components without deep rewrites
  • Published in JMLR, suggesting academic credibility and community target
  • Supports Linux and macOS (M1/M2); Windows is explicitly not officially supported

Caveats

  • Several listed algorithms remain unchecked, so the coverage is still a work in progress
  • The README leans heavily on academic paper references, which may slow down practitioners looking for quick API intuition

Verdict

Researchers actively working in constrained or safety-critical RL should bookmark this; if your use case is standard unconstrained RL, it is likely overkill.

Frequently asked

What is PKU-Alignment/omnisafe?
OmniSafe exists to give safe reinforcement learning algorithms a common, modular benchmark so researchers can stop reinventing the evaluation wheel.
Is omnisafe open source?
Yes — PKU-Alignment/omnisafe is open source, released under the Apache-2.0 license.
What language is omnisafe written in?
PKU-Alignment/omnisafe is primarily written in Python.
How popular is omnisafe?
PKU-Alignment/omnisafe has 1.1k stars on GitHub.
Where can I find omnisafe?
PKU-Alignment/omnisafe is on GitHub at https://github.com/PKU-Alignment/omnisafe.

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