mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-05-04 06:28:05 +00:00
Update GitHub action and pre-commit settings (#196)
* Update GitHub action and pre-commit settings * Update GitHub action and pre-commit settings (#198)
This commit is contained in:
parent
765db512b5
commit
a2f1565672
9
.github/reviewer_list.yml
vendored
Normal file
9
.github/reviewer_list.yml
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
addReviewers: true
|
||||||
|
|
||||||
|
addAssignees: author
|
||||||
|
|
||||||
|
numberOfReviewers: 1
|
||||||
|
|
||||||
|
reviewers:
|
||||||
|
- frankleeeee
|
||||||
|
- kurisusnowdeng
|
83
.github/workflows/PR_CI.yml
vendored
Normal file
83
.github/workflows/PR_CI.yml
vendored
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
name: Pull Request CI and Build
|
||||||
|
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
assign_reviewer:
|
||||||
|
name: Assign Reviewer for PR
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.draft == false && github.base_ref == 'main' && 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.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
|
||||||
|
needs: [assign_reviewer]
|
||||||
|
runs-on: [self-hosted, gpu]
|
||||||
|
container:
|
||||||
|
image: nvcr.io/nvidia/pytorch:21.07-py3
|
||||||
|
options: --gpus all --rm --ipc=host -v /data/cifar-10:/data/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 --global-option="--cuda_ext" .
|
||||||
|
- name: Unit Testing
|
||||||
|
run: |
|
||||||
|
pytest tests
|
||||||
|
env:
|
||||||
|
DATA: /data/cifar-10
|
||||||
|
|
||||||
|
format_check:
|
||||||
|
name: Format Check
|
||||||
|
if: ${{ always() }} && github.event.pull_request.draft == false && github.base_ref == 'main' && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
|
||||||
|
needs: [assign_reviewer, build]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
- name: autoyapf
|
||||||
|
id: autoyapf
|
||||||
|
uses: mritunjaysharma394/autoyapf@v2
|
||||||
|
with:
|
||||||
|
args: --style google --recursive --in-place .
|
||||||
|
|
||||||
|
- name: Check for modified files
|
||||||
|
id: git-check
|
||||||
|
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
||||||
|
|
||||||
|
- name: Push changes
|
||||||
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
|
run: |
|
||||||
|
git config --global user.name 'github-actions'
|
||||||
|
git config --global user.email 'github-actions@github.com'
|
||||||
|
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
||||||
|
git commit -am "Automated autoyapf fixes"
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
# if: steps.format.outputs.has-changes == 'true'
|
||||||
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
with:
|
||||||
|
title: '[Bot] Automated PR to fix formatting errors'
|
||||||
|
body: |
|
||||||
|
Automated PR to fix formatting errors
|
||||||
|
committer: GitHub <noreply@github.com>
|
||||||
|
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||||
|
assignees: ${{ github.actor }}
|
||||||
|
reviewers: frankleeeee
|
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
@ -1,40 +0,0 @@
|
|||||||
name: Build
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [review_requested, synchronize]
|
|
||||||
branches:
|
|
||||||
- "*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build and test Colossal-AI
|
|
||||||
runs-on: [self-hosted, gpu]
|
|
||||||
container:
|
|
||||||
image: nvcr.io/nvidia/pytorch:21.07-py3
|
|
||||||
options: --gpus all --rm --ipc=host -v /data/cifar-10:/data/cifar-10
|
|
||||||
timeout-minutes: 1200
|
|
||||||
if: github.event.pull_request.draft == false && github.base_ref == 'main' && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' && toJson(github.event.pull_request.requested_reviewers) != '[]'
|
|
||||||
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 -v --no-cache-dir --global-option="--cuda_ext" .
|
|
||||||
- name: Unit Testing
|
|
||||||
run: |
|
|
||||||
pytest tests
|
|
||||||
env:
|
|
||||||
DATA: /data/cifar-10
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
10
.github/workflows/close_inactive.yml
vendored
10
.github/workflows/close_inactive.yml
vendored
@ -13,10 +13,12 @@ jobs:
|
|||||||
- uses: actions/stale@v3
|
- uses: actions/stale@v3
|
||||||
with:
|
with:
|
||||||
days-before-issue-stale: 14
|
days-before-issue-stale: 14
|
||||||
days-before-issue-close: 14
|
days-before-issue-close: -1
|
||||||
stale-issue-label: "stale"
|
stale-issue-label: "stale"
|
||||||
stale-issue-message: "This issue is stale because it has been open for 14 days with no activity."
|
stale-issue-message: "This issue is stale because it has been open for 14 days with no activity."
|
||||||
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
|
# close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
|
||||||
days-before-pr-stale: 14
|
days-before-pr-stale: 14
|
||||||
days-before-pr-close: 14
|
days-before-pr-close: -1
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
stale-pr-message: "This PR is stale because it has been open for 14 days with no activity."
|
||||||
|
# close-pr-message: "This PR was closed because it has been inactive for 14 days since being marked as stale."
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
14
.pre-commit-config.yaml
Normal file
14
.pre-commit-config.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-yapf
|
||||||
|
rev: v0.32.0
|
||||||
|
hooks:
|
||||||
|
- id: yapf
|
||||||
|
args: ['--style=google', '--parallel', '--in-place']
|
||||||
|
- repo: https://github.com/pycqa/flake8
|
||||||
|
rev: ''
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
|
rev: v13.0.0
|
||||||
|
hooks:
|
||||||
|
- id: clang-format
|
@ -5,7 +5,7 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
<h3> <a href="https://arxiv.org/abs/2110.14883"> Paper </a> | <a href="https://www.colossalai.org/"> Documentation </a> | <a href="https://github.com/hpcaitech/ColossalAI/discussions"> Forum </a> | <a href="https://medium.com/@hpcaitech"> Blog </a></h3>
|
<h3> <a href="https://arxiv.org/abs/2110.14883"> Paper </a> | <a href="https://www.colossalai.org/"> Documentation </a> | <a href="https://github.com/hpcaitech/ColossalAI/discussions"> Forum </a> | <a href="https://medium.com/@hpcaitech"> Blog </a></h3>
|
||||||
|
|
||||||
[](https://github.com/hpcaitech/ColossalAI/actions/workflows/build.yml)
|
[](https://github.com/hpcaitech/ColossalAI/actions/workflows/PR_CI.yml)
|
||||||
[](https://colossalai.readthedocs.io/en/latest/?badge=latest)
|
[](https://colossalai.readthedocs.io/en/latest/?badge=latest)
|
||||||
</div>
|
</div>
|
||||||
An integrated large-scale model training system with efficient parallelization techniques.
|
An integrated large-scale model training system with efficient parallelization techniques.
|
||||||
|
@ -4,4 +4,5 @@ numpy
|
|||||||
tqdm
|
tqdm
|
||||||
psutil
|
psutil
|
||||||
tensorboard
|
tensorboard
|
||||||
packaging
|
packaging
|
||||||
|
pre-commit
|
||||||
|
Loading…
Reference in New Issue
Block a user