This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1489f47
commit 6d7ebd9
Showing
20 changed files
with
138 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
trigger: | ||
branches: | ||
include: ["master"] | ||
pr: | ||
branches: | ||
include: ["master"] | ||
autoCancel: true | ||
drafts: true | ||
|
||
jobs: | ||
- template: testing-template.yml | ||
parameters: | ||
configs: | ||
- "image" | ||
- "text" | ||
- "tabular" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
jobs: | ||
- ${{ each config in parameters.configs }}: | ||
- job: | ||
displayName: ${{config}} | ||
# how long to run the job before automatically cancelling | ||
timeoutInMinutes: 45 | ||
# how much time to give 'run always even if cancelled tasks' before stopping them | ||
cancelTimeoutInMinutes: 2 | ||
|
||
pool: azure-gpus-spot | ||
# this need to have installed docker in the base image... | ||
container: | ||
# base ML image: mcr.microsoft.com/azureml/openmpi3.1.2-cuda10.2-cudnn8-ubuntu18.04 | ||
image: "pytorchlightning/pytorch_lightning:base-cuda-py3.9-torch1.8" | ||
# image: "pytorch/pytorch:1.8.1-cuda11.0-cudnn8-runtime" | ||
options: "-it --rm --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all --shm-size=32g" | ||
|
||
workspace: | ||
clean: all | ||
steps: | ||
|
||
- bash: | | ||
lspci | egrep 'VGA|3D' | ||
whereis nvidia | ||
nvidia-smi | ||
python --version | ||
pip --version | ||
pip list | ||
df -kh /dev/shm | ||
displayName: 'Image info & NVIDIA' | ||
- bash: | | ||
python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'GPU: {mgpu}'" | ||
displayName: 'Sanity check' | ||
- bash: | | ||
# python -m pip install "pip==20.1" | ||
pip install '.[${{config}}]' | ||
pip install '.[test]' --upgrade-strategy only-if-needed | ||
pip list | ||
displayName: 'Install dependencies' | ||
- bash: | | ||
python -m coverage run --source flash -m pytest flash tests/examples/test_scripts.py -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=30 | ||
displayName: 'Testing' | ||
- bash: | | ||
python -m coverage report | ||
python -m coverage xml | ||
python -m coverage html | ||
python -m codecov --token=$(CODECOV_TOKEN) --commit=$(Build.SourceVersion) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure | ||
ls -l | ||
displayName: 'Statistics' | ||
- task: PublishTestResults@2 | ||
displayName: 'Publish test results' | ||
inputs: | ||
testResultsFiles: '$(Build.StagingDirectory)/test-results.xml' | ||
testRunTitle: '$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)' | ||
condition: succeededOrFailed() | ||
|
||
- task: PublishCodeCoverageResults@1 | ||
displayName: 'Publish coverage report' | ||
inputs: | ||
codeCoverageTool: 'cobertura' | ||
summaryFileLocation: 'coverage.xml' | ||
reportDirectory: '$(Build.SourcesDirectory)/htmlcov' | ||
testRunTitle: '$(Agent.OS) - $(Build.BuildNumber)[$(Agent.JobName)] - Python $(python.version)' | ||
condition: succeededOrFailed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,3 +169,4 @@ urban8k_images/ | |
__MACOSX | ||
*-v2.0.json | ||
cifar-10* | ||
mini-imagenet* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters