mirror of https://github.com/hpcaitech/ColossalAI
update unit testing CI rules
parent
bbbfe9b2c9
commit
dfc3fafe89
|
@ -1,51 +0,0 @@
|
||||||
name: Pull Request CI and Build
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
cancel_previous_workflow:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event.pull_request.draft == false && (github.base_ref == 'main' || github.base_ref == 'develop') && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
|
|
||||||
steps:
|
|
||||||
- name: Cancel Previous Runs
|
|
||||||
uses: styfle/cancel-workflow-action@0.9.1
|
|
||||||
with:
|
|
||||||
access_token: ${{ github.token }}
|
|
||||||
|
|
||||||
assign_reviewer:
|
|
||||||
name: Assign Reviewer for PR
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event.pull_request.draft == false && (github.base_ref == 'main' || github.base_ref == 'develop') && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' && toJson(github.event.pull_request.requested_reviewers) == '[]'
|
|
||||||
steps:
|
|
||||||
- uses: kentaro-m/auto-assign-action@v1.2.1
|
|
||||||
with:
|
|
||||||
configuration-path: '.github/reviewer_list.yml'
|
|
||||||
|
|
||||||
build:
|
|
||||||
name: Build and Test Colossal-AI
|
|
||||||
if: ${{ always() }} && github.event.pull_request.draft == false && (github.base_ref == 'main' || github.base_ref == 'develop') && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
|
|
||||||
needs: [cancel_previous_workflow, assign_reviewer]
|
|
||||||
runs-on: [self-hosted, gpu]
|
|
||||||
container:
|
|
||||||
image: nvcr.io/nvidia/pytorch:21.07-py3
|
|
||||||
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
|
|
||||||
timeout-minutes: 20
|
|
||||||
steps:
|
|
||||||
- name: Setup Environment
|
|
||||||
run: |
|
|
||||||
export https_proxy=http://172.17.0.1:7890 http_proxy=http://172.17.0.1:7890 all_proxy=socks5://172.17.0.1:7890
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
|
||||||
pip install -U pip setuptools wheel --user
|
|
||||||
pip install pytest tensorboard deepspeed apex
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install Colossal-AI
|
|
||||||
run: |
|
|
||||||
pip install -r requirements/requirements.txt
|
|
||||||
pip install -v --no-cache-dir .
|
|
||||||
- name: Unit Testing
|
|
||||||
run: |
|
|
||||||
pytest tests
|
|
||||||
env:
|
|
||||||
DATA: /data/scratch/cifar-10
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
name: Assign Reviewers for Team
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
assign_reviewer:
|
||||||
|
name: Assign Reviewer for PR
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: |
|
||||||
|
github.event.pull_request.draft == false &&
|
||||||
|
(github.base_ref == 'main' || github.base_ref == 'develop')
|
||||||
|
&& github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
|
||||||
|
&& toJson(github.event.pull_request.requested_reviewers) == '[]'
|
||||||
|
steps:
|
||||||
|
- uses: kentaro-m/auto-assign-action@v1.2.1
|
||||||
|
with:
|
||||||
|
configuration-path: '.github/reviewer_list.yml'
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [synchronize, labeled]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and Test Colossal-AI
|
||||||
|
if: |
|
||||||
|
github.event.pull_request.draft == false &&
|
||||||
|
(github.base_ref == 'main' || github.base_ref == 'develop') &&
|
||||||
|
github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' &&
|
||||||
|
contains( github.event.pull_request.labels.*.name, 'Run Build and Test')
|
||||||
|
runs-on: [self-hosted, gpu]
|
||||||
|
container:
|
||||||
|
image: nvcr.io/nvidia/pytorch:21.07-py3
|
||||||
|
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
|
||||||
|
timeout-minutes: 20
|
||||||
|
steps:
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
export https_proxy=http://172.17.0.1:7890 http_proxy=http://172.17.0.1:7890 all_proxy=socks5://172.17.0.1:7890
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
pip install -U pip setuptools wheel --user
|
||||||
|
pip install pytest tensorboard deepspeed apex
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install Colossal-AI
|
||||||
|
run: |
|
||||||
|
pip install -r requirements/requirements.txt
|
||||||
|
pip install -v --no-cache-dir .
|
||||||
|
- name: Unit Testing
|
||||||
|
run: |
|
||||||
|
pytest tests
|
||||||
|
env:
|
||||||
|
DATA: /data/scratch/cifar-10
|
|
@ -1,4 +1,5 @@
|
||||||
name: Close inactive issues
|
name: Close inactive issues
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
name: Compatibility Test
|
name: Compatibility Test
|
||||||
|
|
||||||
# set to pull_request for testing purpose
|
on: workflow_dispatch
|
||||||
# will change to workflow_dispatch when PR to develop
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Test for PyTorch compatibility
|
name: Test for PyTorch compatibility
|
||||||
# comment for now, will uncomment when PR to develop
|
if: (github.base_ref == 'main' || github.base_ref == 'develop') && github.repository == 'hpcaitech/ColossalAI'
|
||||||
# if: (github.base_ref == 'main' || github.base_ref == 'develop') && github.repository == 'hpcaitech/ColossalAI'
|
runs-on: [self-hosted, aws]
|
||||||
runs-on: [self-hosted, gpu]
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -24,7 +21,7 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: ${{ matrix.container }}
|
image: ${{ matrix.container }}
|
||||||
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
|
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
|
||||||
timeout-minutes: 180
|
timeout-minutes: 120
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Environment
|
- name: Setup Environment
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
name: Publish to PyPI
|
name: Publish to PyPI
|
||||||
|
|
||||||
on: workflow_dispatch
|
on: workflow_dispatch
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
name: Synchronize Submodule
|
name: Synchronize Submodule
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
|
@ -12,6 +13,7 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
ref: 'develop'
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: echo
|
- name: echo
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -218,7 +218,7 @@ setup(
|
||||||
extras_require={
|
extras_require={
|
||||||
'zero': fetch_requirements('requirements/requirements-zero.txt'),
|
'zero': fetch_requirements('requirements/requirements-zero.txt'),
|
||||||
},
|
},
|
||||||
python_requires='>=3.6',
|
python_requires='>=3.7',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
'License :: OSI Approved :: Apache Software License',
|
'License :: OSI Approved :: Apache Software License',
|
||||||
|
|
Loading…
Reference in New Issue