diff --git a/.github/workflows/PR_CI.yml b/.github/workflows/PR_CI.yml deleted file mode 100644 index 4bdd6b8b0..000000000 --- a/.github/workflows/PR_CI.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/assign_reviewer.yml b/.github/workflows/assign_reviewer.yml new file mode 100644 index 000000000..871768938 --- /dev/null +++ b/.github/workflows/assign_reviewer.yml @@ -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' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..08b3fc09a --- /dev/null +++ b/.github/workflows/build.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 diff --git a/.github/workflows/close_inactive.yml b/.github/workflows/close_inactive.yml index 988d9e3bc..e7dec4430 100644 --- a/.github/workflows/close_inactive.yml +++ b/.github/workflows/close_inactive.yml @@ -1,4 +1,5 @@ name: Close inactive issues + on: schedule: - cron: "0 0 * * *" diff --git a/.github/workflows/compatibility_test.yml b/.github/workflows/compatibility_test.yml index dbff7e3f8..6b6a4304b 100644 --- a/.github/workflows/compatibility_test.yml +++ b/.github/workflows/compatibility_test.yml @@ -1,15 +1,12 @@ name: Compatibility Test -# set to pull_request for testing purpose -# will change to workflow_dispatch when PR to develop -on: pull_request +on: workflow_dispatch jobs: build: 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' - runs-on: [self-hosted, gpu] + if: (github.base_ref == 'main' || github.base_ref == 'develop') && github.repository == 'hpcaitech/ColossalAI' + runs-on: [self-hosted, aws] strategy: fail-fast: false matrix: @@ -24,7 +21,7 @@ jobs: container: image: ${{ matrix.container }} options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10 - timeout-minutes: 180 + timeout-minutes: 120 steps: - name: Setup Environment run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54d2b587f..c274bfa73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,5 @@ name: Publish to PyPI + on: workflow_dispatch jobs: diff --git a/.github/workflows/submodule.yml b/.github/workflows/submodule.yml index d19892c39..2447284e8 100644 --- a/.github/workflows/submodule.yml +++ b/.github/workflows/submodule.yml @@ -1,4 +1,5 @@ name: Synchronize Submodule + on: workflow_dispatch: schedule: @@ -12,6 +13,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: + ref: 'develop' submodules: true - name: echo diff --git a/setup.py b/setup.py index 0c40f4b51..8b25229f7 100644 --- a/setup.py +++ b/setup.py @@ -218,7 +218,7 @@ setup( extras_require={ 'zero': fetch_requirements('requirements/requirements-zero.txt'), }, - python_requires='>=3.6', + python_requires='>=3.7', classifiers=[ 'Programming Language :: Python :: 3', 'License :: OSI Approved :: Apache Software License',