omnisafe  by PKU-Alignment

SafeRL framework for algorithm research and benchmarking

Created 3 years ago
1,045 stars

Top 36.0% on SourcePulse

GitHubView on GitHub
Project Summary

OmniSafe is a comprehensive, modular Python framework for accelerating research in Safe Reinforcement Learning (SafeRL). It provides a standardized benchmark and an out-of-the-box toolkit for implementing, training, and evaluating SafeRL algorithms, targeting researchers and developers in the field.

How It Works

OmniSafe employs a highly modular design with Adapter and Wrapper components to facilitate seamless integration of diverse SafeRL algorithms and environments. It leverages torch.distributed for high-performance parallel computing, enabling environment-level asynchronous parallelism and agent asynchronous learning to expedite training and improve stability.

Quick Start & Requirements

  • Install: pip install omnisafe
  • Prerequisites: Python 3.8+, PyTorch 1.10+. Officially tested on Linux (Python 3.8-3.10) and macOS (M1/M2). Windows support is community-contributed.
  • Setup: Installation via PyPI is straightforward. For advanced use or development, cloning the repository and installing from source (pip install -e .) within a conda environment is recommended.
  • Resources: Colab notebooks are available for quick exploration.

Highlighted Details

  • Implements over 30 SafeRL algorithms across On-Policy, Off-Policy, Model-Based, and Offline categories, including recent papers from top conferences (NeurIPS, ICML, ICLR, AAAI).
  • Supports a wide range of environments, including Safety-Gymnasium and custom environments via a flexible interface.
  • Provides a Command Line Interface (CLI) for benchmarking, evaluation, and training, simplifying experimental workflows.
  • Includes extensive tutorials and documentation, with community contributions for multi-language support.

Maintenance & Community

The project is primarily developed by the SafeRL research team at PKU-Alignment, led by Prof. Yaodong Yang. Community support is available via GitHub issues.

Licensing & Compatibility

Released under the Apache License 2.0, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

While robust, official support for Windows is not provided. The framework is actively developed, and users should refer to the changelog for potential breaking changes.

Health Check
Last Commit

10 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
16 stars in the last 30 days

Explore Similar Projects

Starred by Yaowei Zheng Yaowei Zheng(Author of LLaMA-Factory), Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), and
1 more.

VeOmni by ByteDance-Seed

1.8%
2k
Framework for scaling multimodal model training across accelerators
Created 9 months ago
Updated 1 day ago
Feedback? Help us improve.