diff --git a/.azure-pipelines/cpu-unit-test.yml b/.azure-pipelines/cpu-unit-test.yml index 88b23796..b1db2062 100644 --- a/.azure-pipelines/cpu-unit-test.yml +++ b/.azure-pipelines/cpu-unit-test.yml @@ -5,18 +5,29 @@ trigger: - main - release/* +strategy: + matrix: + python-3.6: + imageTag: '3.6' + python-3.7: + imageTag: '3.7' + # TODO + #python-latest: + # imageTag: '3' + maxParallel: 3 + pool: vmImage: ubuntu-latest container: - image: python:3.7 + image: python:$(imageTag) steps: - script: | echo "##vso[task.prependpath]$HOME/.local/bin" displayName: Export path - script: | - python3 -m pip install .[test,torch] + python3 -m pip install .[test,cpuworker] make postinstall displayName: Install dependencies - script: | @@ -29,7 +40,7 @@ steps: env: SB_TEST_CUDA: '0' - script: | - bash <(curl -s https://codecov.io/bash) -cF cpu-unit-test + bash <(curl -s https://codecov.io/bash) -cF cpu-python$(imageTag)-unit-test displayName: Report coverage results env: CODECOV_TOKEN: $(codecovToken) diff --git a/.azure-pipelines/cuda-unit-test.yml b/.azure-pipelines/cuda-unit-test.yml index 79f308a4..e0ad977b 100644 --- a/.azure-pipelines/cuda-unit-test.yml +++ b/.azure-pipelines/cuda-unit-test.yml @@ -18,7 +18,7 @@ steps: echo "##vso[task.prependpath]$HOME/.local/bin" displayName: Export path - script: | - python3 -m pip install .[test,nvidia,torch,ort,mpi] + python3 -m pip install .[test,nvworker] make postinstall displayName: Install dependencies - script: | diff --git a/.devcontainer/post-create-command.sh b/.devcontainer/post-create-command.sh index 413da260..e719a357 100644 --- a/.devcontainer/post-create-command.sh +++ b/.devcontainer/post-create-command.sh @@ -4,7 +4,7 @@ set -e export PATH=${HOME}/.local/bin:${PATH} # install python packages -pip install .[dev,test,torch] --user --no-cache-dir --progress-bar=off --use-feature=in-tree-build +pip install .[develop,cpuworker] --user --no-cache-dir --progress-bar=off --use-feature=in-tree-build pre-commit install --install-hooks # install nodejs packages diff --git a/dockerfile/cuda11.1.1.dockerfile b/dockerfile/cuda11.1.1.dockerfile index 1e487429..71b3ab13 100644 --- a/dockerfile/cuda11.1.1.dockerfile +++ b/dockerfile/cuda11.1.1.dockerfile @@ -128,6 +128,6 @@ ADD third_party third_party RUN make -C third_party cuda ADD . . -RUN python3 -m pip install .[nvidia,torch,ort,mpi] && \ +RUN python3 -m pip install .[nvworker] && \ make cppbuild && \ make postinstall diff --git a/dockerfile/rocm5.0.x.dockerfile b/dockerfile/rocm5.0.x.dockerfile index 5d1cb5e5..7f384749 100644 --- a/dockerfile/rocm5.0.x.dockerfile +++ b/dockerfile/rocm5.0.x.dockerfile @@ -124,6 +124,6 @@ ADD third_party third_party RUN make -C third_party rocm ADD . . -RUN python3 -m pip install .[torch,ort,mpi] && \ +RUN python3 -m pip install .[amdworker] && \ make cppbuild && \ make postinstall diff --git a/dockerfile/rocm5.1.x.dockerfile b/dockerfile/rocm5.1.x.dockerfile index e8b452e7..1cc18b46 100644 --- a/dockerfile/rocm5.1.x.dockerfile +++ b/dockerfile/rocm5.1.x.dockerfile @@ -139,6 +139,6 @@ ADD third_party third_party RUN make ROCBLAS_BRANCH=release/rocm-rel-5.1 -C third_party rocm ADD . . -RUN python3 -m pip install .[torch,ort,mpi] && \ +RUN python3 -m pip install .[amdworker] && \ make cppbuild && \ make postinstall diff --git a/docs/developer-guides/development.md b/docs/developer-guides/development.md index 26d9d456..e6b74948 100644 --- a/docs/developer-guides/development.md +++ b/docs/developer-guides/development.md @@ -19,7 +19,7 @@ Follow [System Requirements](../getting-started/installation.mdx). git clone --recurse-submodules -j8 https://github.com/microsoft/superbenchmark cd superbenchmark -python3 -m pip install -e .[dev,test] +python3 -m pip install -e .[develop] ``` ## Lint and Test diff --git a/setup.py b/setup.py index a824627f..adbfefc2 100644 --- a/setup.py +++ b/setup.py @@ -152,11 +152,11 @@ setup( 'natsort>=7.1.1', 'networkx>=1.11', 'numpy>=1.19.2', - 'openpyxl>=3.0.7', 'omegaconf==2.0.6', + 'openpyxl>=3.0.7', 'pandas>=1.1.5', 'pyyaml>=5.3', - 'requests>=2.28.1', + 'requests>=2.27.1', 'seaborn>=0.11.2', 'tcping>=0.1.1rc1', 'urllib3>=1.26.9', @@ -164,35 +164,45 @@ setup( 'xlsxwriter>=1.3.8', 'xmltodict>=0.12.0', ], - extras_require={ - 'dev': ['pre-commit>=2.10.0'], - 'test': [ - 'flake8-docstrings>=1.5.0', - 'flake8-quotes>=3.2.0', - 'flake8>=3.8.4', - 'mypy>=0.800', - 'pydocstyle>=5.1.1', - 'pytest-cov>=2.11.1', - 'pytest-subtests>=0.4.0', - 'pytest>=6.2.2', - 'types-markdown', - 'types-pkg_resources', - 'types-pyyaml', - 'vcrpy>=4.1.1', - 'yapf==0.31.0', - ], - 'nvidia': ['py3nvml>=0.2.6'], - 'ort': [ - 'onnx>=1.10.2', - 'onnxruntime-gpu==1.10.0', - ], - 'torch': [ - 'torch>=1.7.0a0', - 'torchvision>=0.8.0a0', - 'transformers>=4.3.3', - ], - 'mpi': ['mpi4py>=3.1.3'], - }, + extras_require=( + lambda x: { + **x, + 'develop': x['dev'] + x['test'], + 'cpuworker': x['torch'], + 'amdworker': x['torch'] + x['ort'] + x['mpi'], + 'nvworker': x['torch'] + x['ort'] + x['mpi'] + x['nvidia'], + } + )( + { + 'dev': ['pre-commit>=2.10.0'], + 'test': [ + 'flake8-docstrings>=1.5.0', + 'flake8-quotes>=3.2.0', + 'flake8>=3.8.4', + 'mypy>=0.800', + 'pydocstyle>=5.1.1', + 'pytest-cov>=2.11.1', + 'pytest-subtests>=0.4.0', + 'pytest>=6.2.2', + 'types-markdown', + 'types-pkg_resources', + 'types-pyyaml', + 'vcrpy>=4.1.1', + 'yapf==0.31.0', + ], + 'torch': [ + 'torch>=1.7.0a0', + 'torchvision>=0.8.0a0', + 'transformers>=4.3.3', + ], + 'ort': [ + 'onnx>=1.10.2', + 'onnxruntime-gpu==1.10.0', + ], + 'mpi': ['mpi4py>=3.1.3'], + 'nvidia': ['py3nvml>=0.2.6'], + } + ), include_package_data=True, entry_points={ 'console_scripts': [