• Stars
    star
    90
  • Rank 369,088 (Top 8 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Decision Intelligence for digging best parameters in target environment.

DIgging

icon

Twitter Style Test Docs Package

PyPI PyPI - Python Version codecov Loc Comments

GitHub Org's stars GitHub stars GitHub forks GitHub commit activity GitHub license

DIgging -- Decision Intelligence for digging better parameters in target function/environments.

Introduction

DIgging is a heuristic searching and optimization platform with various Decision Intelligence methods such as Genetic Algorithm, Bayesian Optimization and Reinforcement Learning etc. It can be used to digging better candidates to handle combinatorial optimization problems and non-gradient search problems.

DIgging is a fundamental platform under OpenDILab and it uses DI-engine to build RL searching pipelines.

Documentation

Outlines

Installation

You can simply install DIgging with pip command line from the official PyPI site.

pip install --user digging
python -c 'import digging'

Or you can simply install it from the source code.

git clone git clone https://github.com/opendilab/DIgging.git
cd DIgging
pip install --user .
python -c 'import digging'

It will automatically install DI-engine together with its requirement packages i.e. PyTorch.

Quick start

DIgging defines core algorithm and searching methods as Digger. You can define a Digger with a searching Space, and can be modified by a config dict. DIgging provides two kinds of searching pipeline for a target function. Thet are listed as follow.

  1. Interactive Procedure

It is done by calling Digger's propose and update_score method, in which you can flexibly define the searching procedures. You can call the provide_best method at any time to see the currently best candidate sample and its score. Here's an simple example:

def target_func(x):
    ...
	return score

space = YourSpace(shape=(...))
digger = YourDigger(config, space)

for i in range(max_iterations):
    samples = digger.propose(sample_num)
    scores = [target_func(x) for x in samples]
    digger.update_score(samples, scores)

print(digger.provide_best())
  1. Functional Procedure

It is done by calling the search method of Digger, with target function provided as input. The digger will automatically search the best samples of the target according to the config. Here's an example:

def target_func(x):
    ...
    return score

space = YourSpace(shape=(...))
digger = YourDigger(config, space)

digger.search(target_func)

print(digger.provide_best())
  1. Reinforcement Learning Procedure

When using a Reinforcement Learning Digger, users need to provide an RL Policy defined in DI-engine form, and some other RL workers in DI-engine such as Collector, Learner, ReplayBuffer are supposed to be used in the Digger. In the searching procedure, a target Env is used instead of a function. So we suggest to use the search method to if the user is not familiar with the RL pipeline of DI-engine. Here's an example.

def target_func(x):
    ...
    return score

rl_config = EasyDict(dict(...))
space = YourSearchSpace(shape=(...))
policy = YourPolicy(rl_config.policy, ...)
digger = RLDigger(rl_cfg, space, policy)

digger.search(target_func)

print(digger.provide_best())

Digging Method Zoo

  • Genetic Algorithm
  • Bayesian Optimization
  • RL

Join and Contribute

We appreciate all contributions to improve DIgging, both algorithms and system designs. Welcome to OpenDILab community! Scan the QR code and add us on Wechat:

qr

Or you can contact us with slack or email ([email protected]).

License

DIgging is released under the Apache 2.0 license.

More Repositories

1

awesome-RLHF

A curated list of reinforcement learning with human feedback resources (continually updated)
3,262
star
2

DI-engine

OpenDILab Decision AI Engine. The Most Comprehensive Reinforcement Learning Framework B.P.
Python
3,041
star
3

PPOxFamily

PPO x Family DRL Tutorial Course(决策智能入门级公开课:8节课帮你盘清算法理论,理顺代码逻辑,玩转决策AI应用实践 )
Python
1,875
star
4

DI-star

An artificial intelligence platform for the StarCraft II with large-scale distributed training and grand-master agents.
Python
1,215
star
5

LightZero

[NeurIPS 2023 Spotlight] LightZero: A Unified Benchmark for Monte Carlo Tree Search in General Sequential Decision Scenarios (awesome MCTS)
Python
1,097
star
6

awesome-model-based-RL

A curated list of awesome model based RL resources (continually updated)
851
star
7

awesome-diffusion-model-in-rl

A curated list of Diffusion Model in RL resources (continually updated)
739
star
8

awesome-decision-transformer

A curated list of Decision Transformer resources (continually updated)
671
star
9

LMDrive

[CVPR 2024] LMDrive: Closed-Loop End-to-End Driving with Large Language Models
Jupyter Notebook
592
star
10

DI-drive

Decision Intelligence Platform for Autonomous Driving simulation.
Python
563
star
11

InterFuser

[CoRL 2022] InterFuser: Safety-Enhanced Autonomous Driving Using Interpretable Sensor Fusion Transformer
Python
522
star
12

LLMRiddles

Open-Source Reproduction/Demo of the LLM Riddles Game
Python
515
star
13

GoBigger

[ICLR 2023] Come & try Decision-Intelligence version of "Agar"! Gobigger could also help you with multi-agent decision intelligence study.
Python
459
star
14

DI-sheep

羊了个羊 + 深度强化学习(Deep Reinforcement Learning + 3 Tiles Game)
Python
416
star
15

awesome-end-to-end-autonomous-driving

A curated list of awesome End-to-End Autonomous Driving resources (continually updated)
371
star
16

awesome-multi-modal-reinforcement-learning

A curated list of Multi-Modal Reinforcement Learning resources (continually updated)
367
star
17

awesome-exploration-rl

A curated list of awesome exploration RL resources (continually updated)
365
star
18

SO2

[AAAI2024] A Perspective of Q-value Estimation on Offline-to-Online Reinforcement Learning
Python
285
star
19

DI-engine-docs

DI-engine docs (Chinese and English)
Python
281
star
20

DI-orchestrator

OpenDILab RL Kubernetes Custom Resource and Operator Lib
Go
240
star
21

DI-smartcross

Decision Intelligence platform for Traffic Crossing Signal Control
Python
230
star
22

treevalue

Here are the most awesome tree structure computing solutions, make your life easier. (这里有目前性能最优的树形结构计算解决方案)
Python
228
star
23

DI-hpc

OpenDILab RL HPC OP Lib, including CUDA and Triton kernel
Python
222
star
24

awesome-AI-based-protein-design

A collection of research papers for AI-based protein design
216
star
25

ACE

[AAAI 2023] Official PyTorch implementation of paper "ACE: Cooperative Multi-agent Q-learning with Bidirectional Action-Dependency".
Python
212
star
26

DI-treetensor

Let DI-treetensor help you simplify the structure processing!(树形运算一不小心就逻辑混乱?DI-treetensor快速帮你搞定)
Python
202
star
27

GoBigger-Challenge-2021

Interested in multi-agents? The 1st Go-Bigger Multi-Agent Decision Intelligence Challenge is coming and a big bonus is waiting for you!
Python
195
star
28

Gobigger-Explore

Still struggling with the high threshold or looking for the appropriate baseline? Come here and new starters can also play with your own multi-agents!
Python
185
star
29

DI-store

OpenDILab RL Object Store
Go
177
star
30

LightTuner

Python
173
star
31

DOS

[CVPR 2023] ReasonNet: End-to-End Driving with Temporal and Global Reasoning
Python
145
star
32

DI-toolkit

A simple toolkit package for opendilab
Python
113
star
33

DI-bioseq

Decision Intelligence platform for Biological Sequence Searching
Python
111
star
34

DI-1024

1024 + 深度强化学习(Deep Reinforcement Learning + 1024 Game/ 2048 Game)
Python
109
star
35

SmartRefine

[CVPR 2024] SmartRefine: A Scenario-Adaptive Refinement Framework for Efficient Motion Prediction
Python
107
star
36

awesome-driving-behavior-prediction

A collection of research papers for Driving Behavior Prediction
77
star
37

PsyDI

PsyDI: Towards a Personalized and Progressively In-depth Chatbot for Psychological Measurements. (e.g. MBTI Measurement Agent)
TypeScript
70
star
38

DI-adventure

Decision Intelligence Adventure for Beginners
Python
68
star
39

GenerativeRL

Python library for solving reinforcement learning (RL) problems using generative models (e.g. Diffusion Models).
Python
48
star
40

huggingface_ding

Auxiliary code for pulling, loading reinforcement learning models based on DI-engine from the Huggingface Hub, or pushing them onto Huggingface Hub with auto-created model card.
Python
46
star
41

CodeMorpheus

CodeMorpheus: Generate code self-portraits with one click(一键生成代码自画像,决策型 AI + 生成式 AI)
Python
45
star
42

OpenPaL

Building open-ended embodied agent in battle royale FPS game
33
star
43

awesome-ui-agents

A curated list of of awesome UI agents resources, encompassing Web, App, OS, and beyond (continually updated)
31
star
44

.github

The first decision intelligence platform covering the most complete algorithms in academia and industry
19
star
45

CleanS2S

High-quality and streaming Speech-to-Speech interactive agent in a single file. 只用一个文件实现的流式全双工语音交互原型智能体!
1
star