Skip to content

Commit f02bd4f

Browse files
authored
Revert "Temporarily disable linux CPU tests (#416)". And put back cuda 11.8, cuda 12.4 tests (#441)
1 parent 22ce083 commit f02bd4f

File tree

2 files changed

+69
-70
lines changed

2 files changed

+69
-70
lines changed

.github/workflows/linux_cuda_wheel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
# For the actual release we should add that label and change this to
6767
# include more python versions.
6868
python-version: ['3.9']
69-
cuda-version: ['12.6']
69+
cuda-version: ['11.8', '12.4', '12.6']
7070
ffmpeg-version-for-tests: ['5', '6', '7']
7171
container:
7272
image: "pytorch/manylinux2_28-builder:cuda${{ matrix.cuda-version }}"

.github/workflows/linux_wheel.yaml

Lines changed: 68 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ defaults:
2424
shell: bash -l -eo pipefail {0}
2525

2626
jobs:
27+
2728
generate-matrix:
2829
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
2930
with:
@@ -55,76 +56,74 @@ jobs:
5556
build-platform: "python-build-package"
5657
build-command: "BUILD_AGAINST_ALL_FFMPEG_FROM_S3=1 python -m build --wheel -vvv --no-isolation"
5758

58-
# TODO: Put this back!!!!
59-
# See https://github.com/pytorch/torchcodec/issues/415
60-
# install-and-test:
61-
# runs-on: ubuntu-latest
62-
# strategy:
63-
# fail-fast: false
64-
# matrix:
65-
# python-version: ['3.9']
66-
# ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
67-
# needs: build
68-
# steps:
69-
# - uses: actions/download-artifact@v3
70-
# with:
71-
# name: pytorch_torchcodec__${{ matrix.python-version }}_cpu_x86_64
72-
# path: pytorch/torchcodec/dist/
73-
# - name: Setup conda env
74-
# uses: conda-incubator/setup-miniconda@v2
75-
# with:
76-
# auto-update-conda: true
77-
# miniconda-version: "latest"
78-
# activate-environment: test
79-
# python-version: ${{ matrix.python-version }}
80-
# - name: Update pip
81-
# run: python -m pip install --upgrade pip
82-
# - name: Install PyTorch
83-
# run: |
84-
# python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
85-
# - name: Install torchcodec from the wheel
86-
# run: |
87-
# wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
88-
# echo Installing $wheel_path
89-
# python -m pip install $wheel_path -vvv
59+
install-and-test:
60+
runs-on: ubuntu-latest
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
python-version: ['3.9']
65+
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
66+
needs: build
67+
steps:
68+
- uses: actions/download-artifact@v3
69+
with:
70+
name: pytorch_torchcodec__${{ matrix.python-version }}_cpu_x86_64
71+
path: pytorch/torchcodec/dist/
72+
- name: Setup conda env
73+
uses: conda-incubator/setup-miniconda@v2
74+
with:
75+
auto-update-conda: true
76+
miniconda-version: "latest"
77+
activate-environment: test
78+
python-version: ${{ matrix.python-version }}
79+
- name: Update pip
80+
run: python -m pip install --upgrade pip
81+
- name: Install PyTorch
82+
run: |
83+
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
84+
- name: Install torchcodec from the wheel
85+
run: |
86+
wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
87+
echo Installing $wheel_path
88+
python -m pip install $wheel_path -vvv
9089
91-
# - name: Check out repo
92-
# uses: actions/checkout@v3
93-
# - name: Install ffmpeg, post build
94-
# run: |
95-
# # Ideally we would have checked for that before installing the wheel,
96-
# # but we need to checkout the repo to access this file, and we don't
97-
# # want to checkout the repo before installing the wheel to avoid any
98-
# # side-effect. It's OK.
99-
# source packaging/helpers.sh
100-
# assert_ffmpeg_not_installed
90+
- name: Check out repo
91+
uses: actions/checkout@v3
92+
- name: Install ffmpeg, post build
93+
run: |
94+
# Ideally we would have checked for that before installing the wheel,
95+
# but we need to checkout the repo to access this file, and we don't
96+
# want to checkout the repo before installing the wheel to avoid any
97+
# side-effect. It's OK.
98+
source packaging/helpers.sh
99+
assert_ffmpeg_not_installed
101100
102-
# conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
103-
# ffmpeg -version
101+
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
102+
ffmpeg -version
104103
105-
# - name: Install test dependencies
106-
# run: |
107-
# python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
108-
# # Ideally we would find a way to get those dependencies from pyproject.toml
109-
# python -m pip install numpy pytest pillow
104+
- name: Install test dependencies
105+
run: |
106+
python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
107+
# Ideally we would find a way to get those dependencies from pyproject.toml
108+
python -m pip install numpy pytest pillow
110109
111-
# - name: Delete the src/ folder just for fun
112-
# run: |
113-
# # The only reason we checked-out the repo is to get access to the
114-
# # tests. We don't care about the rest. Out of precaution, we delete
115-
# # the src/ folder to be extra sure that we're running the code from
116-
# # the installed wheel rather than from the source.
117-
# # This is just to be extra cautious and very overkill because a)
118-
# # there's no way the `torchcodec` package from src/ can be found from
119-
# # the PythonPath: the main point of `src/` is precisely to protect
120-
# # against that and b) if we ever were to execute code from
121-
# # `src/torchcodec`, it would fail loudly because the built .so files
122-
# # aren't present there.
123-
# rm -r src/
124-
# ls
125-
# - name: Smoke test
126-
# run: |
127-
# python -X faulthandler test/decoders/manual_smoke_test.py
128-
# - name: Run Python tests
129-
# run: |
130-
# pytest test -vvv
110+
- name: Delete the src/ folder just for fun
111+
run: |
112+
# The only reason we checked-out the repo is to get access to the
113+
# tests. We don't care about the rest. Out of precaution, we delete
114+
# the src/ folder to be extra sure that we're running the code from
115+
# the installed wheel rather than from the source.
116+
# This is just to be extra cautious and very overkill because a)
117+
# there's no way the `torchcodec` package from src/ can be found from
118+
# the PythonPath: the main point of `src/` is precisely to protect
119+
# against that and b) if we ever were to execute code from
120+
# `src/torchcodec`, it would fail loudly because the built .so files
121+
# aren't present there.
122+
rm -r src/
123+
ls
124+
- name: Smoke test
125+
run: |
126+
python -X faulthandler test/decoders/manual_smoke_test.py
127+
- name: Run Python tests
128+
run: |
129+
pytest test -vvv

0 commit comments

Comments
 (0)