mirror of https://github.com/hpcaitech/ColossalAI
added compatibility CI and options for release ci
parent
115bcc0b41
commit
bbbfe9b2c9
|
@ -0,0 +1,49 @@
|
||||||
|
name: Compatibility Test
|
||||||
|
|
||||||
|
# set to pull_request for testing purpose
|
||||||
|
# will change to workflow_dispatch when PR to develop
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
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]
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# 20.07: PyTorch 1.6.0a0+9907a3e + Python 3.6
|
||||||
|
# 20.10: PyTorch 1.7.0a0+7036e91 + Python 3.8
|
||||||
|
# 20.12: PyTorch 1.8.0a0+1606899 + Python 3.8
|
||||||
|
# 21.06: PyTorch 1.9.0a0+c3d40fd + Python 3.8
|
||||||
|
container: ["nvcr.io/nvidia/pytorch:20.07-py3",
|
||||||
|
"nvcr.io/nvidia/pytorch:20.10-py3",
|
||||||
|
"nvcr.io/nvidia/pytorch:20.12-py3",
|
||||||
|
"nvcr.io/nvidia/pytorch:21.06-py3"]
|
||||||
|
container:
|
||||||
|
image: ${{ matrix.container }}
|
||||||
|
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
|
||||||
|
timeout-minutes: 180
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.7.4'
|
||||||
# publish to PyPI if executed on the main branch
|
# publish to PyPI if executed on the main branch
|
||||||
# publish to Test PyPI if executed on the develop branch
|
# publish to Test PyPI if executed on the develop branch
|
||||||
- name: Publish package to Test PyPI
|
- name: Publish package to Test PyPI
|
||||||
|
@ -18,9 +20,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
user: __token__
|
user: __token__
|
||||||
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||||
|
verbose: true
|
||||||
- name: Publish package to PyPI
|
- name: Publish package to PyPI
|
||||||
if: github.base_ref == 'main'
|
if: github.base_ref == 'main'
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
user: __token__
|
user: __token__
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
verbose: true
|
||||||
|
|
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.7',
|
python_requires='>=3.6',
|
||||||
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