From 966268dce49e8221d40faf822bb9d04e684c8e56 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 3 Feb 2025 11:27:32 +0000 Subject: [PATCH 1/6] 0.2.0 Release --- .github/workflows/linux_cuda_wheel.yaml | 4 ++-- .github/workflows/linux_wheel.yaml | 2 +- .github/workflows/macos_wheel.yaml | 2 +- setup.py | 2 ++ version.txt | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux_cuda_wheel.yaml b/.github/workflows/linux_cuda_wheel.yaml index 890e4a7f5..c4738cc84 100644 --- a/.github/workflows/linux_cuda_wheel.yaml +++ b/.github/workflows/linux_cuda_wheel.yaml @@ -65,10 +65,10 @@ jobs: # PR. # For the actual release we should add that label and change this to # include more python versions. - python-version: ['3.9'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] cuda-version: ['11.8', '12.4', '12.6'] # TODO: put back ffmpeg 5 https://github.com/pytorch/torchcodec/issues/325 - ffmpeg-version-for-tests: ['6', '7'] + ffmpeg-version-for-tests: ['5', '6', '7'] container: image: "pytorch/manylinux2_28-builder:cuda${{ matrix.cuda-version }}" options: "--gpus all -e NVIDIA_DRIVER_CAPABILITIES=video,compute,utility" diff --git a/.github/workflows/linux_wheel.yaml b/.github/workflows/linux_wheel.yaml index f5e665f55..6b09c504a 100644 --- a/.github/workflows/linux_wheel.yaml +++ b/.github/workflows/linux_wheel.yaml @@ -61,7 +61,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1'] needs: build steps: diff --git a/.github/workflows/macos_wheel.yaml b/.github/workflows/macos_wheel.yaml index b7cc965eb..efe8c440c 100644 --- a/.github/workflows/macos_wheel.yaml +++ b/.github/workflows/macos_wheel.yaml @@ -62,7 +62,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1'] needs: build steps: diff --git a/setup.py b/setup.py index 9120c7fe0..80d7d63da 100644 --- a/setup.py +++ b/setup.py @@ -178,12 +178,14 @@ def _write_version_files(): # the content of `version.txt` plus some suffix like "+cpu" or "+cu112". # See # https://github.com/pytorch/test-infra/blob/61e6da7a6557152eb9879e461a26ad667c15f0fd/tools/pkg-helpers/pytorch_pkg_helpers/version.py#L113 + version = version.replace("+cpu", "") with open(_ROOT_DIR / "version.txt", "w") as f: f.write(f"{version}") else: with open(_ROOT_DIR / "version.txt") as f: version = f.readline().strip() try: + version = version.replace("+cpu", "") sha = ( subprocess.check_output( ["git", "rev-parse", "HEAD"], cwd=str(_ROOT_DIR) diff --git a/version.txt b/version.txt index db5a1c4b4..0ea3a944b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.1.2a0 +0.2.0 From 73f4860296ca27b1da7ba681fe80ed8145082f49 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 3 Feb 2025 11:44:02 +0000 Subject: [PATCH 2/6] Update test-infra ref branches --- .github/workflows/docs.yaml | 8 ++++---- .github/workflows/linux_cuda_wheel.yaml | 8 ++++---- .github/workflows/linux_wheel.yaml | 8 ++++---- .github/workflows/macos_wheel.yaml | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 59ddf382d..c2218042b 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -15,12 +15,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6 with: package-type: wheel os: linux test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6 with-cpu: disable with-xpu: disable with-rocm: disable @@ -31,12 +31,12 @@ jobs: strategy: fail-fast: false name: Build and Upload wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6 with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6 build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py diff --git a/.github/workflows/linux_cuda_wheel.yaml b/.github/workflows/linux_cuda_wheel.yaml index c4738cc84..25ecd595d 100644 --- a/.github/workflows/linux_cuda_wheel.yaml +++ b/.github/workflows/linux_cuda_wheel.yaml @@ -25,12 +25,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6 with: package-type: wheel os: linux test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6 with-cpu: disable with-xpu: disable with-rocm: disable @@ -41,12 +41,12 @@ jobs: strategy: fail-fast: false name: Build and Upload wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6 with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6 build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py diff --git a/.github/workflows/linux_wheel.yaml b/.github/workflows/linux_wheel.yaml index 6b09c504a..f40dbaeb1 100644 --- a/.github/workflows/linux_wheel.yaml +++ b/.github/workflows/linux_wheel.yaml @@ -26,12 +26,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6 with: package-type: wheel os: linux test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6 with-xpu: disable with-rocm: disable with-cuda: disable @@ -42,12 +42,12 @@ jobs: strategy: fail-fast: false name: Build and Upload Linux wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6 with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6 build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py diff --git a/.github/workflows/macos_wheel.yaml b/.github/workflows/macos_wheel.yaml index efe8c440c..cf9974fec 100644 --- a/.github/workflows/macos_wheel.yaml +++ b/.github/workflows/macos_wheel.yaml @@ -26,12 +26,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6 with: package-type: wheel os: macos-arm64 test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6 with-xpu: disable with-rocm: disable with-cuda: disable @@ -42,12 +42,12 @@ jobs: strategy: fail-fast: false name: Build and Upload Mac wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main + uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@release/2.6 with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6 build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py From 7469bf57da831e21b223b3dd5c4b1505bb1b95c2 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 3 Feb 2025 11:48:54 +0000 Subject: [PATCH 3/6] empty From 3e59e334f8bb20d123276399bbd7d6f74c055b66 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 3 Feb 2025 11:48:58 +0000 Subject: [PATCH 4/6] empty From 6a1572f0a27d4314d51c3c9fd33ae807faa3cf93 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 3 Feb 2025 11:57:04 +0000 Subject: [PATCH 5/6] Use proper stable index --- .github/workflows/cpp_tests.yaml | 2 +- .github/workflows/docs.yaml | 2 +- .github/workflows/lint.yaml | 2 +- .github/workflows/linux_cuda_wheel.yaml | 2 +- .github/workflows/linux_wheel.yaml | 4 ++-- .github/workflows/macos_wheel.yaml | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cpp_tests.yaml b/.github/workflows/cpp_tests.yaml index b2b19a785..8daead6f8 100644 --- a/.github/workflows/cpp_tests.yaml +++ b/.github/workflows/cpp_tests.yaml @@ -34,7 +34,7 @@ jobs: run: python -m pip install --upgrade pip - name: Install dependencies run: | - python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu - name: Install ffmpeg and pkg-config run: | conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" pkg-config -c conda-forge diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index c2218042b..d592d0dba 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -93,7 +93,7 @@ jobs: run: ${CONDA_RUN} python -m pip install --upgrade pip - name: Install PyTorch run: | - ${CONDA_RUN} python -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu${{ env.cuda_version_without_periods }} + ${CONDA_RUN} python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cu${{ env.cuda_version_without_periods }} ${CONDA_RUN} python -c 'import torch; print(f"{torch.__version__}"); print(f"{torch.__file__}"); print(f"{torch.cuda.is_available()=}")' - name: Install torchcodec from the wheel run: | diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 71cc071c8..4248c85a0 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -62,7 +62,7 @@ jobs: run: python -m pip install --upgrade pip - name: Install dependencies and FFmpeg run: | - python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu conda install "ffmpeg=7.0.1" pkg-config -c conda-forge ffmpeg -version - name: Build and install torchcodec diff --git a/.github/workflows/linux_cuda_wheel.yaml b/.github/workflows/linux_cuda_wheel.yaml index 25ecd595d..911f6a70c 100644 --- a/.github/workflows/linux_cuda_wheel.yaml +++ b/.github/workflows/linux_cuda_wheel.yaml @@ -106,7 +106,7 @@ jobs: run: ${CONDA_RUN} python -m pip install --upgrade pip - name: Install PyTorch run: | - ${CONDA_RUN} python -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu${{ env.cuda_version_without_periods }} + ${CONDA_RUN} python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cu${{ env.cuda_version_without_periods }} ${CONDA_RUN} python -c 'import torch; print(f"{torch.__version__}"); print(f"{torch.__file__}"); print(f"{torch.cuda.is_available()=}")' - name: Install torchcodec from the wheel run: | diff --git a/.github/workflows/linux_wheel.yaml b/.github/workflows/linux_wheel.yaml index f40dbaeb1..124932320 100644 --- a/.github/workflows/linux_wheel.yaml +++ b/.github/workflows/linux_wheel.yaml @@ -80,7 +80,7 @@ jobs: run: python -m pip install --upgrade pip - name: Install PyTorch run: | - python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu - name: Install torchcodec from the wheel run: | wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"` @@ -103,7 +103,7 @@ jobs: - name: Install test dependencies run: | - python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torchvision --index-url https://download.pytorch.org/whl/cpu # Ideally we would find a way to get those dependencies from pyproject.toml python -m pip install numpy pytest pillow diff --git a/.github/workflows/macos_wheel.yaml b/.github/workflows/macos_wheel.yaml index cf9974fec..098553b21 100644 --- a/.github/workflows/macos_wheel.yaml +++ b/.github/workflows/macos_wheel.yaml @@ -84,7 +84,7 @@ jobs: - name: Install PyTorch run: | - python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu - name: Install torchcodec from the wheel run: | @@ -102,7 +102,7 @@ jobs: - name: Install test dependencies run: | - python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torchvision --index-url https://download.pytorch.org/whl/cpu python -m pip install numpy pytest pillow - name: Delete the src/ folder just for fun From de634c8eb1e29d26d3efb1e528163aac63a6e3ec Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 3 Feb 2025 13:35:38 +0000 Subject: [PATCH 6/6] Use release/2.6-torchcodec branch to fix wheel GitHub upload --- .github/workflows/docs.yaml | 8 ++++---- .github/workflows/linux_cuda_wheel.yaml | 8 ++++---- .github/workflows/linux_wheel.yaml | 8 ++++---- .github/workflows/macos_wheel.yaml | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index d592d0dba..49c922ffc 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -15,12 +15,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6 + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6-torchcodec with: package-type: wheel os: linux test-infra-repository: pytorch/test-infra - test-infra-ref: release/2.6 + test-infra-ref: release/2.6-torchcodec with-cpu: disable with-xpu: disable with-rocm: disable @@ -31,12 +31,12 @@ jobs: strategy: fail-fast: false name: Build and Upload wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6 + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6-torchcodec with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: release/2.6 + test-infra-ref: release/2.6-torchcodec build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py diff --git a/.github/workflows/linux_cuda_wheel.yaml b/.github/workflows/linux_cuda_wheel.yaml index 911f6a70c..385cb7b97 100644 --- a/.github/workflows/linux_cuda_wheel.yaml +++ b/.github/workflows/linux_cuda_wheel.yaml @@ -25,12 +25,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6 + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6-torchcodec with: package-type: wheel os: linux test-infra-repository: pytorch/test-infra - test-infra-ref: release/2.6 + test-infra-ref: release/2.6-torchcodec with-cpu: disable with-xpu: disable with-rocm: disable @@ -41,12 +41,12 @@ jobs: strategy: fail-fast: false name: Build and Upload wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6 + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6-torchcodec with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: release/2.6 + test-infra-ref: release/2.6-torchcodec build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py diff --git a/.github/workflows/linux_wheel.yaml b/.github/workflows/linux_wheel.yaml index 124932320..319d362c2 100644 --- a/.github/workflows/linux_wheel.yaml +++ b/.github/workflows/linux_wheel.yaml @@ -26,12 +26,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6 + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6-torchcodec with: package-type: wheel os: linux test-infra-repository: pytorch/test-infra - test-infra-ref: release/2.6 + test-infra-ref: release/2.6-torchcodec with-xpu: disable with-rocm: disable with-cuda: disable @@ -42,12 +42,12 @@ jobs: strategy: fail-fast: false name: Build and Upload Linux wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6 + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6-torchcodec with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: release/2.6 + test-infra-ref: release/2.6-torchcodec build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py diff --git a/.github/workflows/macos_wheel.yaml b/.github/workflows/macos_wheel.yaml index 098553b21..82e5cdd11 100644 --- a/.github/workflows/macos_wheel.yaml +++ b/.github/workflows/macos_wheel.yaml @@ -26,12 +26,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6 + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6-torchcodec with: package-type: wheel os: macos-arm64 test-infra-repository: pytorch/test-infra - test-infra-ref: release/2.6 + test-infra-ref: release/2.6-torchcodec with-xpu: disable with-rocm: disable with-cuda: disable @@ -42,12 +42,12 @@ jobs: strategy: fail-fast: false name: Build and Upload Mac wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@release/2.6 + uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@release/2.6-torchcodec with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: release/2.6 + test-infra-ref: release/2.6-torchcodec build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py