Skip to content

Commit

Permalink
Tune Conda CI timeout and other minor improvements (#10769)
Browse files Browse the repository at this point in the history
  • Loading branch information
carmocca authored and lexierule committed Nov 30, 2021
1 parent 4e08de2 commit 288d018
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci_test-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:

- name: Test Package [only]
run: |
# NOTE: run coverage on tests does not propagate failure status for Win, https://github.com/nedbat/coveragepy/issues/1003
coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
- name: Upload pytest test results
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci_test-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
python-version: ["3.8"] # previous to last Python version as that one is already used in test-full
pytorch-version: ["1.7", "1.8", "1.9", "1.10"] # nightly: add when there's a release candidate

timeout-minutes: 35
timeout-minutes: 30
steps:
- uses: actions/checkout@v2

Expand All @@ -29,7 +29,8 @@ jobs:
python ./requirements/adjust_versions.py requirements/extra.txt
python ./requirements/adjust_versions.py requirements/examples.txt
pip install --requirement requirements/devel.txt --find-links https://download.pytorch.org/whl/nightly/torch_nightly.html
pip install pytest-random-order
# set a per-test timeout of 2.5 minutes to fail sooner. this aids with hanging tests
pip install pytest-timeout
pip list
- name: Pull checkpoints from S3
Expand All @@ -42,8 +43,7 @@ jobs:
- name: Tests
run: |
# NOTE: run coverage on tests does not propagate failure status for Win, https://github.com/nedbat/coveragepy/issues/1003
coverage run --source pytorch_lightning -m pytest --random-order-seed=1 pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml
coverage run --source pytorch_lightning -m pytest --timeout 150 pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml
shell: bash -l {0}

- name: Upload pytest results
Expand Down
7 changes: 4 additions & 3 deletions requirements/adjust_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ def test():
else:
requirements_path, torch_version = sys.argv[1], None

with open(requirements_path, "r+") as fp:
with open(requirements_path) as fp:
requirements = fp.read()
requirements = main(requirements, torch_version)
print(requirements) # on purpose - to debug
requirements = main(requirements, torch_version)
print(requirements) # on purpose - to debug
with open(requirements_path, "w") as fp:
fp.write(requirements)

0 comments on commit 288d018

Please sign in to comment.