Skip to content

Commit 09050db

Browse files
committed
v0.1.0
0 parents  commit 09050db

File tree

986 files changed

+91972
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

986 files changed

+91972
-0
lines changed

.coveragerc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[run]
2+
omit =
3+
ding/utils/slurm_helper.py
4+
ding/utils/file_helper.py
5+
ding/utils/linklink_dist_helper.py
6+
ding/utils/k8s_helper.py
7+
ding/config/utils.py
8+
ding/entry
9+
ding/entry/tests/test_serial_entry_algo.py
10+
ding/entry/dist_entry.py
11+
ding/hpc_rl
12+
ding/worker/collector/tests/speed_test

.flake8

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
ignore=F401,F841,F403,E226,E126,W504,E265,E722,W503,W605,E741,E122
3+
max-line-length=120
4+
statistics

.github/issue_templates/base.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
- [ ] I have marked all applicable categories:
2+
+ [ ] exception-raising bug
3+
+ [ ] RL algorithm bug
4+
+ [ ] system worker bug
5+
+ [ ] system utils bug
6+
+ [ ] code design/refactor
7+
+ [ ] documentation request
8+
+ [ ] new feature request
9+
- [ ] I have visited the [readme](https://github.com/opendilab/DI-engine/blob/github-dev/README.md) and [doc]()
10+
- [ ] I have searched through the [issue tracker](https://github.com/opendilab/DI-engine/issues) and [pr tracker](https://github.com/opendilab/DI-engine/pulls)
11+
- [ ] I have mentioned version numbers, operating system and environment, where applicable:
12+
```python
13+
import ding, torch, sys
14+
print(ding.__version__, torch.__version__, sys.version, sys.platform)
15+
```
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Description
2+
3+
4+
## Related Issue
5+
6+
7+
## TODO
8+
9+
10+
## Check List
11+
12+
- [ ] merge the latest version source branch/repo, and resolve all the conflicts
13+
- [ ] pass style check
14+
- [ ] pass all the tests

.github/workflows/algo_test.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will check pytest
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: algo_test
5+
6+
on:
7+
push:
8+
paths:
9+
- "ding/policy/*"
10+
- "ding/model/*"
11+
- "ding/rl_utils/*"
12+
pull_request:
13+
paths:
14+
- "ding/policy/*"
15+
- "ding/model/*"
16+
- "ding/rl_utils/*"
17+
18+
jobs:
19+
test_algotest:
20+
runs-on: ubuntu-latest
21+
if: "!contains(github.event.head_commit.message, 'ci skip')"
22+
strategy:
23+
matrix:
24+
python-version: [3.6, 3.7, 3.8]
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
- name: do_algotest
33+
env:
34+
WORKERS: 4
35+
DURATIONS: 600
36+
run: |
37+
python -m pip install .
38+
python -m pip install ".[test]"
39+
make algotest

.github/workflows/doc.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will check flake style
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: doc
5+
6+
on:
7+
push:
8+
branches: [main, github-dev, /^doc/.*$/]
9+
pull_request:
10+
branches: [main, github-dev, /^doc/.*$/]
11+
12+
jobs:
13+
doc:
14+
runs-on: ubuntu-latest
15+
if: "!contains(github.event.head_commit.message, 'doc skip')"
16+
strategy:
17+
matrix:
18+
python-version: [3.7]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Generate
27+
run: |
28+
python -m pip install .
29+
python -m pip install ".[doc]"
30+
make docs
31+
mv ding/docs/build/html public
32+
rm -rf ding/docs/build
33+
- name: Deploy
34+
uses: JamesIves/[email protected]
35+
with:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
BRANCH: gh-pages # The branch the action should deploy to.
38+
FOLDER: public # The folder the action should deploy.
39+
CLEAN: true # Automatically remove deleted files from the deploy branch

.github/workflows/install.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will install Python dependencies
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: install
5+
6+
on:
7+
- push
8+
- pull_request
9+
10+
jobs:
11+
install:
12+
runs-on: ubuntu-latest
13+
if: "!contains(github.event.head_commit.message, 'ci skip')"
14+
strategy:
15+
matrix:
16+
python-version: [3.6, 3.7, 3.8]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: install dependencies
25+
run: |
26+
python -m pip install .

.github/workflows/platform_test.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will check pytest
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: platform_test
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
test_unittest:
10+
runs-on: ${{ matrix.os }}
11+
if: "!contains(github.event.head_commit.message, 'ci skip')"
12+
strategy:
13+
matrix:
14+
# os: [macos-latest, windows-latest]
15+
os: [macos-latest]
16+
python-version: [3.6, 3.7, 3.8]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: do_unittest
25+
env:
26+
WORKERS: 1
27+
run: |
28+
python -m pip install .
29+
python -m pip install ".[test]"
30+
make platformtest

.github/workflows/style.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This workflow will check flake style
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: style
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
style:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.6, 3.7, 3.8]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: code style
22+
run: |
23+
python -m pip install yapf==0.29.0 flake8
24+
make format_test flake_check

.github/workflows/unit_test.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will check pytest
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: unit_test
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
test_unittest:
10+
runs-on: ubuntu-latest
11+
if: "!contains(github.event.head_commit.message, 'ci skip')"
12+
strategy:
13+
matrix:
14+
python-version: [3.6, 3.7, 3.8]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: do_unittest
23+
env:
24+
WORKERS: 4
25+
run: |
26+
python -m pip install .
27+
python -m pip install ".[test]"
28+
make unittest
29+
30+
test_benchmark:
31+
runs-on: ubuntu-latest
32+
if: "!contains(github.event.head_commit.message, 'ci skip')"
33+
strategy:
34+
matrix:
35+
python-version: [3.6, 3.7, 3.8]
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Set up Python ${{ matrix.python-version }}
40+
uses: actions/setup-python@v2
41+
with:
42+
python-version: ${{ matrix.python-version }}
43+
- name: do_benchmark
44+
env:
45+
WORKERS: 1
46+
run: |
47+
python -m pip install .
48+
python -m pip install ".[test]"
49+
make benchmark

0 commit comments

Comments
 (0)