Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
6c4ff94b
Unverified
Commit
6c4ff94b
authored
Mar 14, 2023
by
Philip Meier
Committed by
GitHub
Mar 14, 2023
Browse files
also surface failing tests in prototype jobs (#7416)
parent
d2eaeb8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
61 deletions
+21
-61
.github/workflows/prototype-tests-linux-gpu.yml
.github/workflows/prototype-tests-linux-gpu.yml
+21
-61
No files found.
.github/workflows/prototype-tests-linux-gpu.yml
View file @
6c4ff94b
...
@@ -4,91 +4,51 @@ on:
...
@@ -4,91 +4,51 @@ on:
pull_request
:
pull_request
:
jobs
:
jobs
:
tests
:
unit
tests
-prototype
:
strategy
:
strategy
:
matrix
:
matrix
:
python-version
:
python-version
:
-
"
3.8"
-
"
3.8"
-
"
3.9"
-
"
3.9"
-
"
3.10"
-
"
3.10"
-
"
3.11"
runner
:
[
"
linux.12xlarge"
]
gpu-arch-type
:
[
"
cpu"
]
gpu-arch-type
:
[
"
cpu"
]
gpu-arch-version
:
[
"
"
]
runner
:
[
"
linux.2xlarge"
]
include
:
include
:
-
python-version
:
"
3.8"
-
python-version
:
"
3.8"
runner
:
linux.g5.4xlarge.nvidia.gpu
gpu-arch-type
:
cuda
gpu-arch-type
:
cuda
gpu-arch-version
:
"
11.7"
gpu-arch-version
:
"
11.7"
runner
:
linux.4xlarge.nvidia.gpu
fail-fast
:
false
fail-fast
:
false
uses
:
pytorch/test-infra/.github/workflows/linux_job.yml@main
uses
:
pytorch/test-infra/.github/workflows/linux_job.yml@main
with
:
with
:
job-name
:
Python ${{ matrix.python-version }}, ${{ matrix.gpu-arch-type }}
repository
:
pytorch/vision
repository
:
pytorch/vision
runner
:
${{ matrix.runner }}
gpu-arch-type
:
${{ matrix.gpu-arch-type }}
gpu-arch-type
:
${{ matrix.gpu-arch-type }}
gpu-arch-version
:
${{ matrix.gpu-arch-version }}
gpu-arch-version
:
${{ matrix.gpu-arch-version }}
runner
:
${{ matrix.runner }}
timeout
:
120
timeout
:
45
script
:
|
script
:
|
# Mark Build Directory Safe
set -euo pipefail
echo '::group::Set PyTorch conda channel'
export PYTHON_VERSION=${{ matrix.python-version }}
if [[ (${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
POSTFIX=test
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
else
./.github/scripts/setup-env.sh
POSTFIX=nightly
fi
# Prepare conda
PYTORCH_CHANNEL=pytorch-"${POSTFIX}"
CONDA_PATH=$(which conda)
echo "${PYTORCH_CHANNEL}"
eval "$(${CONDA_PATH} shell.bash hook)"
echo '::endgroup::'
conda activate ci
echo '::group::Set PyTorch conda mutex'
if [[ ${{ matrix.gpu-arch-type }} = 'cuda' ]]; then
PYTORCH_MUTEX="pytorch-cuda=${{ matrix.gpu-arch-version }}"
else
PYTORCH_MUTEX=cpuonly
fi
echo "${PYTORCH_MUTEX}"
echo '::endgroup::'
echo '::group::Create conda environment'
conda create --prefix $PWD/ci \
--quiet --yes \
python=${{ matrix.python-version }} \
numpy libpng jpeg scipy
conda activate $PWD/ci
echo '::endgroup::'
echo '::group::Install PyTorch'
conda install \
--quiet --yes \
-c "${PYTORCH_CHANNEL}" \
-c nvidia \
pytorch \
"${PYTORCH_MUTEX}"
if [[ ${{ matrix.gpu-arch-type }} = 'cuda' ]]; then
python3 -c "import torch; exit(not torch.cuda.is_available())"
fi
echo '::endgroup::'
echo '::group::Install TorchVision'
python setup.py develop
echo '::endgroup::'
echo '::group::Collect PyTorch environment information'
python -m torch.utils.collect_env
echo '::endgroup::'
echo '::group::Install testing utilities'
echo '::group::Install testing utilities'
pip install --progress-bar=off pytest pytest-mock pytest-cov
pip install --progress-bar=off pytest pytest-mock pytest-cov
echo '::endgroup::'
echo '::endgroup::'
echo '::group::Run prototype tests'
# We don't want to run the prototype datasets tests. Since the positional glob into `pytest`, i.e.
# We don't want to run the prototype datasets tests. Since the positional glob into `pytest`, i.e.
# `test/test_prototype*.py` takes the highest priority, neither `--ignore` nor `--ignore-glob` can help us here.
# `test/test_prototype*.py` takes the highest priority, neither `--ignore` nor `--ignore-glob` can help us here.
rm test/test_prototype_datasets*.py
rm test/test_prototype_datasets*.py
pytest \
pytest \
--durations=25 \
-v --durations=25 \
--cov=torchvision/prototype \
--cov=torchvision/prototype --cov-report=term-missing \
--cov-report=term-missing \
--junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" \
test/test_prototype*.py
test/test_prototype_*.py
echo '::endgroup::'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment