jobs: - job: DeepSpeed_Tests timeoutInMinutes: 360 pool: name: 'DS_testing' strategy: matrix: PyTorch12: python.version: '3.6' cuda.version: '10.0' pytorch.version: '1.2' runmodeltests: false PyTorch15: python.version: '3.7' cuda.version: '10.1' pytorch.version: '1.5' runmodeltests: true variables: conda_root: '/home/deepspeed/miniconda3' conda_env: 'ds_test_py$(python.version)_cuda$(cuda.version)_pytorch$(pytorch.version)' conda_env_path: '$(conda_root)/envs/$(conda_env)' steps: # Unfortunately nvidia's nvcc_linux-64= seems to install 10.1 regardless? # Most of this complexity is a workaround to get the compiler toolchain to match the # cudatoolkit runtime - script: | conda create --force --yes -n $(conda_env) python=$(python.version) cudatoolkit=$(cuda.version) source $(conda_root)/bin/activate $(conda_env_path) conda install --yes -c pytorch pytorch=$(pytorch.version) cudatoolkit=$(cuda.version) conda install --yes conda conda install --yes gxx_linux-64 conda install --yes -c conda-forge cudatoolkit-dev=$(cuda.version) displayName: 'Setup environment python=$(python.version) pytorch=$(pytorch.version) cuda=$(cuda.version)' - script: | source $(conda_root)/bin/activate $(conda_env_path) python --version which nvcc nvcc --version python -c "import torch; print('torch:', torch.__version__)" displayName: 'Show environment' - script: | source $(conda_root)/bin/activate $(conda_env_path) rm -rf third_party/apex/build/ rm -rf third_party/apex/dist/ rm -rf build/ rm -rf dist/ ./install.sh displayName: 'Install DeepSpeed' - script: | source $(conda_root)/bin/activate $(conda_env_path) pytest --forked --verbose tests/unit/ displayName: 'Unit tests' - script: | source $(conda_root)/bin/activate $(conda_env_path) ln -s /data/Megatron-LM/data DeepSpeedExamples/Megatron-LM/ pip install -r DeepSpeedExamples/Megatron-LM/requirements.txt cd tests/model/ rm -rf BingBertSquad/baseline rm -rf Megatron_GPT2/baseline pytest -s run_sanity_check.py condition: eq(variables['runmodeltests'], true) displayName: 'Model tests' #BingBertSquad logs - task: PublishPipelineArtifact@1 inputs: targetPath: '$(Build.SourcesDirectory)/tests/model/BingBertSquad/test/' artifactName: BingBertSquad_logs displayName: 'BingBertSquad log uploads' condition: eq(variables['runmodeltests'], true) - job: Code_Quality_Checks pool: name: 'DS_testing' variables: conda_root: '/home/deepspeed/miniconda3' conda_env: 'ds_codetest' conda_env_path: '$(conda_root)/envs/$(conda_env)' steps: - script: | conda create --force --yes -n $(conda_env) python=3.7 source $(conda_root)/bin/activate $(conda_env_path) displayName: 'Create code test environment' - script: | source $(conda_root)/bin/activate $(conda_env_path) pip install pre-commit pre-commit run --all-files displayName: 'Formatting checks' - script: | source $(conda_root)/bin/activate $(conda_env_path) pip install pylint pylint --exit-zero deepspeed/ displayName: 'Code linter'