DI-engine  by opendilab

Decision AI engine for PyTorch/JAX, comprehensive RL framework

Created 4 years ago
3,515 stars

Top 13.8% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

DI-engine is a comprehensive decision intelligence engine for PyTorch and JAX, designed to standardize and accelerate research and development in deep reinforcement learning (DRL). It caters to researchers and practitioners by providing a modular framework that supports a vast array of DRL algorithms, from basic to multi-agent, imitation learning, offline RL, model-based RL, and LLM+RL.

How It Works

DI-engine employs a python-first, asynchronous-native approach with task and middleware abstractions. It modularly integrates core decision-making components: Env, Policy, and Model. A key innovation is its use of TreeTensor as a general data container, simplifying data handling across diverse modules and enabling seamless extension of PyTorch tensor operations to nested data structures. This design promotes code reusability and efficient large-scale RL training.

Quick Start & Requirements

  • Install: pip install DI-engine
  • Prerequisites: PyTorch or JAX. Docker images are available for various environments (Atari, MuJoCo, etc.).
  • Resources: Official documentation and tutorials are available, including a 3-minute kickoff Colab notebook.

Highlighted Details

  • Supports over 50 DRL algorithms, including DQN, PPO, SAC, QMIX, GAIL, CQL, DreamerV3, and LLM+RL methods like PromptPG.
  • Extensive environment support, covering Atari, MuJoCo, PyBullet, PettingZoo (MARL), SMAC, GFootball, and real-world applications like autonomous driving (DI-drive) and traffic light control (DI-smartcross).
  • Features TreeTensor for efficient handling of complex, nested data structures, simplifying pipeline implementation.
  • Includes specialized modules for distributed RL (DI-orchestrator, DI-hpc) and efficient data storage (DI-store).

Maintenance & Community

The project is actively maintained by OpenDILab. Community engagement is encouraged via GitHub issues, Discord, Slack, and WeChat. A roadmap is available for future development.

Licensing & Compatibility

DI-engine is released under the Apache 2.0 license, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

While comprehensive, the sheer breadth of algorithms and environments means some may be less mature or have fewer examples than others. Users should consult specific algorithm documentation for detailed performance characteristics and potential limitations.

Health Check
Last Commit

1 month ago

Responsiveness

1 day

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

Explore Similar Projects

Starred by Jerry Tworek Jerry Tworek(VP Research at OpenAI), Jianwei Yang Jianwei Yang(Research Scientist at Meta Superintelligence Lab), and
1 more.

pytorch-rl by jingweiz

0%
801
Deep RL research with PyTorch and Visdom
Created 8 years ago
Updated 5 years ago
Starred by Evan Hubinger Evan Hubinger(Head of Alignment Stress-Testing at Anthropic), Jiayi Pan Jiayi Pan(Author of SWE-Gym; MTS at xAI), and
1 more.

rl by pytorch

0.4%
3k
PyTorch library for reinforcement learning research
Created 3 years ago
Updated 2 days ago
Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Former Cofounder of Luma AI) and Will Brown Will Brown(Research Lead at Prime Intellect).

atomic-agents by BrainBlend-AI

0.8%
5k
Agentic AI framework for building modular, predictable AI pipelines
Created 1 year ago
Updated 2 weeks ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Pawel Garbacki Pawel Garbacki(Cofounder of Fireworks AI), and
6 more.

tianshou by thu-ml

0.2%
9k
PyTorch RL library for algorithm development and application
Created 7 years ago
Updated 1 week ago
Feedback? Help us improve.