Skip to content

Commit

Permalink
unify configs (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda authored May 19, 2023
1 parent a0bad20 commit fa02907
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 50 deletions.
21 changes: 14 additions & 7 deletions .azure/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
# how much time to give 'run always even if cancelled tasks' before stopping them
cancelTimeoutInMinutes: "2"

pool: lit-rtx-3090
variables:
DEVICES: $( python -c 'name = "$(Agent.Name)" ; gpus = name.split("_")[-1] if "_" in name else "0,1"; print(gpus)' )
DEBIAN_FRONTEND: "noninteractive"
Expand All @@ -32,6 +31,7 @@ jobs:
image: "pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime"
#endpoint: azureContainerRegistryConnection
options: "--gpus=all --shm-size=16g -v /usr/bin/docker:/tmp/docker:ro -v /var/tmp:/var/tmp"
pool: lit-rtx-3090

workspace:
clean: all
Expand Down Expand Up @@ -63,10 +63,10 @@ jobs:
displayName: 'Sanity check'
- bash: |
set -ex
set -e
# Box2D requirement for swig
sudo apt-get remove swig -y
sudo apt-get install swig3.0 -y
sudo apt-get remove -y swig
sudo apt-get install -y swig3.0
sudo ln -s /usr/bin/swig3.0 /usr/bin/swig
sudo apt-get update --fix-missing
Expand All @@ -81,7 +81,7 @@ jobs:
pip list
displayName: 'Install pkg & dependencies'
- bash: |
- script: |
set -ex
mkdir -p datasets
cd datasets
Expand All @@ -91,13 +91,16 @@ jobs:
displayName: Download ROMs
- bash: |
python -m pytest pl_bolts tests -v --cov=pl_bolts --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=30
python -m pytest tests/ -v --cov=pl_bolts --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=30
displayName: 'Testing'
- bash: |
python -m coverage report
python -m coverage xml
python -m codecov --token=$(CODECOV_TOKEN) --commit=$(Build.SourceVersion) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov --token=$(CODECOV_TOKEN) --commit=$(Build.SourceVersion) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure
ls -l
displayName: 'Statistics'
Expand All @@ -116,3 +119,7 @@ jobs:
# reportDirectory: '$(Build.SourcesDirectory)/htmlcov'
# testRunTitle: '$(Agent.OS) - $(Build.BuildNumber)[$(Agent.JobName)] - Python $(python.version)'
# condition: succeededOrFailed()

- bash: rm -rf $(Build.SourcesDirectory)
condition: succeededOrFailed()
displayName: 'Cleanup'
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Install package
run: |
pip install "pip==22.2.1" # todo: drop after resolving extras
pip install -e . --upgrade --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -e . "coverage[toml]" --upgrade --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip list
- name: Test Package [only]
Expand Down
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
[metadata]
license_file = "LICENSE"
description-file = "README.md"

[build-system]
requires = ["setuptools", "wheel"]


[tool.check-manifest]
ignore = [
"*.yml",
".github",
".github/*"
]


[tool.pytest.ini_options]
norecursedirs = [
".git",
".github",
"dist",
"build",
"docs",
]
addopts = [
"--strict-markers",
"--doctest-modules",
"--color=yes",
"--disable-pytest-warnings",
]
#filterwarnings = [
# "error::FutureWarning",
#]
xfail_strict = false # todo
junit_duration_report = "call"

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"pass",
]

[tool.coverage.run]
parallel = true
# concurrency = "thread"
relative_files = true


[tool.black]
# https://github.com/psf/black
line-length = 120
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# coverage>=5.0
coverage[toml] >7.0
pytest >7.0.0, <=7.3.1
pytest-cov >=3.0.0, <4.0.0
# pytest-flake8
Expand Down
41 changes: 0 additions & 41 deletions setup.cfg

This file was deleted.

0 comments on commit fa02907

Please sign in to comment.