* add PL config

* badge

* prune

* PT

* cov

* .
This commit is contained in:
Jirka Borovec 2021-03-01 22:10:06 +01:00 коммит произвёл GitHub
Родитель 4bf6ed3382
Коммит f5ae915210
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 68 добавлений и 0 удалений

Просмотреть файл

@ -6,6 +6,8 @@
[![CI testing](https://github.com/PyTorchLightning/metrics/workflows/CI%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/torchmetrics/actions?query=workflow%3A%22CI+testing%22)
![Check Code formatting](https://github.com/PyTorchLightning/metrics/workflows/Check%20Code%20formatting/badge.svg?branch=master&event=push)
[![Build Status](https://dev.azure.com/PytorchLightning/Metrics/_apis/build/status/PyTorchLightning.metrics?branchName=master)](https://dev.azure.com/PytorchLightning/Metrics/_build/latest?definitionId=3&branchName=master)
[![codecov](https://codecov.io/gh/PyTorchLightning/metrics/branch/main/graph/badge.svg?token=NER6LPI3HS)](https://codecov.io/gh/PyTorchLightning/metrics)
[![Documentation Status](https://readthedocs.org/projects/metrics/badge/?version=latest)](https://metrics.readthedocs.io/en/latest/?badge=latest)
## Installation

66
azure-pipelines.yml Normal file
Просмотреть файл

@ -0,0 +1,66 @@
# 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:
- master
- release/*
jobs:
- job: pytest
# how long to run the job before automatically cancelling
timeoutInMinutes: 25
# how much time to give 'run always even if cancelled tasks' before stopping them
cancelTimeoutInMinutes: 2
pool: gridai-spot-pool
container:
image: "pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime"
options: "--runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all"
workspace:
clean: all
steps:
- bash: |
lspci | egrep 'VGA|3D'
whereis nvidia
nvidia-smi
python --version
pip --version
pip list
displayName: 'Image info & NVIDIA'
- bash: |
#sudo apt-get install -y cmake
# python -m pip install "pip==20.1"
pip install --requirement requirements.txt
pip install --requirement ./tests/requirements.txt --upgrade-strategy only-if-needed
pip list
displayName: 'Install dependencies'
- bash: |
python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'GPU: {mgpu}'"
displayName: 'Sanity check'
- bash: |
python -m coverage run --source torchmetrics -m pytest torchmetrics tests -v --durations=50
displayName: 'Testing'
- bash: |
python -m coverage report
python -m coverage xml
python -m codecov --token=$(CODECOV_TOKEN) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure
displayName: 'Statistics'