2021-09-10 11:30:44 +00:00
|
|
|
# Python package
|
|
|
|
# Create and test a Python package on multiple Python versions.
|
|
|
|
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
|
|
|
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
tags:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- "master"
|
|
|
|
- "release/*"
|
|
|
|
- "refs/tags/*"
|
|
|
|
|
|
|
|
pr: none
|
|
|
|
|
2021-07-28 16:09:15 +00:00
|
|
|
schedules:
|
|
|
|
- cron: "0 0 * * *" # At the end of every day
|
|
|
|
displayName: Daily midnight benchmark
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- "master"
|
2021-07-20 21:23:53 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-07-28 16:09:15 +00:00
|
|
|
- job: benchmarks
|
|
|
|
timeoutInMinutes: "90"
|
|
|
|
cancelTimeoutInMinutes: "2"
|
2022-03-21 17:17:34 +00:00
|
|
|
pool: azure-gpus-spot
|
2021-07-20 21:23:53 +00:00
|
|
|
container:
|
2022-05-06 02:56:57 +00:00
|
|
|
image: "pytorchlightning/pytorch_lightning:base-cuda-py3.7-torch1.8"
|
2021-07-28 16:09:15 +00:00
|
|
|
options: "--runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all --shm-size=32g"
|
2021-07-20 21:23:53 +00:00
|
|
|
workspace:
|
|
|
|
clean: all
|
|
|
|
|
|
|
|
steps:
|
2022-05-06 02:56:57 +00:00
|
|
|
- bash: |
|
|
|
|
# TODO: Prepare a docker image with 1.8.2 (LTS) installed and remove manual installation.
|
|
|
|
pip install torch==1.8.2+cu102 torchvision==0.9.2+cu102 torchtext==0.9.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
|
|
|
|
pip list
|
|
|
|
displayName: 'Install PyTorch LTS'
|
|
|
|
|
2021-07-20 21:23:53 +00:00
|
|
|
- bash: |
|
2021-11-19 02:07:33 +00:00
|
|
|
python -m pytest tests/benchmarks -v --durations=0
|
2021-07-20 21:23:53 +00:00
|
|
|
displayName: 'Testing: benchmarks'
|
|
|
|
env:
|
|
|
|
PL_RUNNING_BENCHMARKS: 1
|